summaryrefslogtreecommitdiff
path: root/db/create.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/create.sql')
-rw-r--r--db/create.sql7
1 files changed, 0 insertions, 7 deletions
diff --git a/db/create.sql b/db/create.sql
index 57c3647..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,13 +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,
- is_visible bool not null default true,
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)
);