From e7e44889cc37207222660f9fec9f25fd82f20d0d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 21 Feb 2017 12:21:12 +0000 Subject: [PATCH] Bug 15707: Add UNIQUE constraint to library groups table Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/library_groups.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/library_groups.sql b/installer/data/mysql/atomicupdate/library_groups.sql index ba30eec4d6..f05e44fd59 100644 --- a/installer/data/mysql/atomicupdate/library_groups.sql +++ b/installer/data/mysql/atomicupdate/library_groups.sql @@ -8,5 +8,6 @@ CREATE TABLE library_groups ( updated_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Date and time of last PRIMARY KEY id ( id ), FOREIGN KEY (parent_id) REFERENCES library_groups(id) ON UPDATE CASCADE ON DELETE CASCADE, - FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON UPDATE CASCADE ON DELETE CASCADE + FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON UPDATE CASCADE ON DELETE CASCADE, + UNIQUE( title ) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- 2.14.1