From c4b71579939c9461379472ee36675ff6ecb1b417 Mon Sep 17 00:00:00 2001
From: Timotej Lazar <timotej.lazar@fri.uni-lj.si>
Date: Mon, 12 Oct 2015 13:04:19 +0200
Subject: Drop name column from language/group/problem tables

---
 db/create.sql | 6 ------
 1 file changed, 6 deletions(-)

(limited to 'db/create.sql')

diff --git a/db/create.sql b/db/create.sql
index bb7ee35..4abdb33 100644
--- a/db/create.sql
+++ b/db/create.sql
@@ -46,19 +46,15 @@ create table user_in_group (
 
 create table language (
   id integer not null default nextval('language_id_seq'),
-  name varchar(30) not null,
   identifier varchar(30) not null,
   constraint language_pk primary key (id),
-  constraint language_uq1 unique (name),
   constraint language_uq2 unique (identifier)
 );
 
 create table problem_group (
   id integer not null default nextval('problem_group_id_seq'),
-  name varchar(100) not null,
   identifier varchar(100) not null,
   constraint group_pk primary key (id),
-  constraint group_uq1 unique (name),
   constraint group_uq2 unique (identifier)
 );
 
@@ -66,12 +62,10 @@ create table problem (
   id integer not null default nextval('problem_id_seq'),
   language_id integer not null,
   problem_group_id integer not null,
-  name varchar(100) not null,
   identifier varchar(100) not null,
   constraint problem_pk primary key (id),
   constraint problem_fk1 foreign key (language_id) references language (id) on delete no action on update cascade,
   constraint problem_fk2 foreign key (problem_group_id) references problem_group (id) on delete no action on update cascade,
-  constraint problem_uq1 unique (language_id, problem_group_id, name),
   constraint problem_uq2 unique (language_id, problem_group_id, identifier)
 );
 
-- 
cgit v1.2.1

