201601301833_contrainte_bank_operations_moves.sql 404 Bytes
Newer Older
thejoelinux's avatar
thejoelinux committed
1 2 3 4 5 6 7 8
ALTER TABLE `bank_operations` ADD KEY `move_id_idx` (`move_id`);
ALTER TABLE `bank_operations` CHANGE `move_id` `move_id` INT(11) NULL DEFAULT NULL;
update bank_operations set move_id = NULL where move_id = 0;

ALTER TABLE `bank_operations` ADD  FOREIGN KEY (`move_id`) REFERENCES `ludotheque`.`moves`(`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;


INSERT INTO schema_migrations values ('201601301833');