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 <gmc@esilibrary.com>
This commit is contained in:
Galen Charlton 2013-06-14 07:48:24 -07:00
parent 2e86612a15
commit 43b17feed6

View file

@ -2532,7 +2532,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;
--