From 42811816028142f4a9ae07999f9a09338d2cc14f Mon Sep 17 00:00:00 2001 From: jgallego Date: Wed, 8 May 2019 15:34:10 +0200 Subject: [PATCH] alter table ticket --- db/changes/10004-mother/00-ticket.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 db/changes/10004-mother/00-ticket.sql diff --git a/db/changes/10004-mother/00-ticket.sql b/db/changes/10004-mother/00-ticket.sql new file mode 100644 index 000000000..97cd6ed73 --- /dev/null +++ b/db/changes/10004-mother/00-ticket.sql @@ -0,0 +1,10 @@ +ALTER TABLE `vn2008`.`Tickets` +ADD COLUMN `zoneFk` INT(11) NULL DEFAULT NULL AFTER `isDeleted`, +ADD INDEX `Tickets_zoneFk_fk_idx` (`zoneFk` ASC); + +ALTER TABLE `vn2008`.`Tickets` +ADD CONSTRAINT `Tickets_zoneFk_fk` + FOREIGN KEY (`zoneFk`) + REFERENCES `vn`.`zone` (`id`) + ON DELETE RESTRICT + ON UPDATE CASCADE; \ No newline at end of file