From c9907413d7829d78eff55fb0c9af0e166ac8f0b3 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 --- 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 ba30eec..f05e44f 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.1.4