14 lines
457 B
MySQL
14 lines
457 B
MySQL
|
ALTER TABLE `vn`.`country`
|
||
|
ADD COLUMN `continentFk` TINYINT(4) NULL AFTER `ibanLength`,
|
||
|
ADD INDEX `continent_id_fk_idx` (`continentFk` ASC);
|
||
|
|
||
|
ALTER TABLE `vn`.`country`
|
||
|
ADD CONSTRAINT `continent_id_fk`
|
||
|
FOREIGN KEY (`continentFk`)
|
||
|
REFERENCES `vn`.`continent` (`id`)
|
||
|
ON DELETE NO ACTION
|
||
|
ON UPDATE CASCADE;
|
||
|
|
||
|
UPDATE `vn`.`country` SET `continentFk` = '2' WHERE (`id` = '11');
|
||
|
UPDATE `vn`.`country` SET `continentFk` = '2' WHERE (`id` = '13');
|