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:
parent
2e86612a15
commit
43b17feed6
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
||||
--
|
||||
|
|
Loading…
Reference in a new issue