salix/db/versions/.archive/10256-orangeFern/00-firstScript.sql

16 lines
405 B
MySQL
Raw Permalink Normal View History

-- Place your SQL code here
ALTER TABLE `vn`.`ticketRecalc`
DROP FOREIGN KEY `ticketRecalc_ibfk_1`;
ALTER TABLE `vn`.`ticketRecalc`
ADD COLUMN `id` INT(11) NOT NULL AUTO_INCREMENT FIRST,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id`);
ALTER TABLE `vn`.`ticketRecalc`
ADD CONSTRAINT `ticketRecalc_ibfk_1`
FOREIGN KEY (`ticketFk`)
REFERENCES `vn`.`ticket` (`id`)
ON DELETE CASCADE
ON UPDATE CASCADE;