From 2302293e770e2b003c0d90cd5672af928c5f2e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Thu, 20 Aug 2015 11:56:50 +0200 Subject: Bugfix: database constraint problem.problem_uq2 referenced only identifier, but it should reference the triplet (language_id, problem_group_id, identifier) instead. --- db/create.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db') 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 ( -- cgit v1.2.1