-- 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;