summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorAleš Smodiš <aless@guru.si>2015-08-20 11:56:50 +0200
committerAleš Smodiš <aless@guru.si>2015-08-20 11:56:50 +0200
commit2302293e770e2b003c0d90cd5672af928c5f2e4e (patch)
treee16e269d75c1416b56ae9bbc91b063e4d9e43783 /db
parent2ec25e5ddaa41c32ab96f93dd2ad6a40646290b6 (diff)
Bugfix: database constraint problem.problem_uq2 referenced only identifier, but it should reference the triplet (language_id, problem_group_id, identifier) instead.
Diffstat (limited to 'db')
-rw-r--r--db/create.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/create.sql b/db/create.sql
index 39eab20..e720238 100644
--- a/db/create.sql
+++ b/db/create.sql
@@ -72,7 +72,7 @@ create table problem (
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 (identifier)
+ constraint problem_uq2 unique (language_id, problem_group_id, identifier)
);
create table solution (