ALTER TABLE `qs_Promo` DROP FOREIGN KEY `qs_Promo_ibfk_1`; ALTER TABLE `qs_Promo` ADD CONSTRAINT `qs_Promo_ibfk_1` FOREIGN KEY (`productId`) REFERENCES `qs_Product`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;