From cb4c29a97cc01a0184b1c39a6ab0e09506817ace Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 14 Jun 2013 07:48:24 -0700 Subject: [PATCH] Bug 10443: (follow-up) make sure borrower_files has FK constraint This follows the example of the DBrev that introduced this table. Signed-off-by: Galen Charlton (cherry picked from commit 43b17feed6ce64bdff6b31918e40170f6681e397) Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/kohastructure.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3ac2108e2e..c64a0cd269 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2431,7 +2431,8 @@ CREATE TABLE IF NOT EXISTS `borrower_files` ( `file_content` longblob NOT NULL, `date_uploaded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`file_id`), - KEY `borrowernumber` (`borrowernumber`) + KEY `borrowernumber` (`borrowernumber`), + CONSTRAINT borrower_files_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- 2.20.1