salix/db/versions/.archive/10259-limeMonstera/00-firstScript.sql

15 lines
413 B
MySQL
Raw Permalink Normal View History

-- Place your SQL code here
ALTER TABLE `hedera`.`orderRecalc`
DROP FOREIGN KEY `orderRecalc_ibfk_1`;
ALTER TABLE `hedera`.`orderRecalc`
ADD COLUMN `id` INT(11) NOT NULL AUTO_INCREMENT FIRST,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id`);
ALTER TABLE `hedera`.`orderRecalc`
ADD CONSTRAINT `orderRecalc_ibfk_1`
FOREIGN KEY (`orderFk`)
REFERENCES `hedera`.`order` (`id`)
ON DELETE CASCADE
ON UPDATE CASCADE;