diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 63f206a7d..bae229513 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -56,6 +56,27 @@ INSERT INTO `vn`.`worker`(`id`,`code`, `firstName`, `lastName`, `userFk`, `bossF SELECT id,UPPER(LPAD(role, 3, '0')), name, name, id, 9 FROM `vn`.`user`; +ALTER TABLE `vn`.`worker` ADD `originCountryFk` mediumint(8) unsigned NULL COMMENT 'PaĆ­s de origen'; +ALTER TABLE `vn`.`worker` ADD `educationLevelFk` SMALLINT NULL; +ALTER TABLE `vn`.`worker` ADD `SSN` varchar(15) NULL; +ALTER TABLE `vn`.`worker` CHANGE `maritalStatus__` `maritalStatus` enum('S','M') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; +ALTER TABLE `vn`.`worker` MODIFY COLUMN `maritalStatus` enum('S','M') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; +ALTER TABLE `vn`.`worker` CHANGE `maritalStatus` maritalStatus enum('S','M') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL AFTER sectorFk; +ALTER TABLE `vn`.`worker` ADD CONSTRAINT `worker_FK_2` FOREIGN KEY (`educationLevelFk`) REFERENCES `vn`.`educationLevel`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; +ALTER TABLE `vn`.`worker` ADD CONSTRAINT `worker_FK_1` FOREIGN KEY (`originCountryFk`) REFERENCES `vn`.`country`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; + +UPDATE `vn`.`worker` `w` + SET `maritalStatus` = 'S'; + +UPDATE `vn`.`worker` `w` + SET `originCountryFk` = '1'; + +UPDATE `vn`.`worker` `w` + SET `educationLevelFk` = '2'; + +UPDATE `vn`.`worker` `w` + SET `SSN` = '123456789123'; + UPDATE `vn`.`worker` SET bossFk = NULL WHERE id = 20; UPDATE `vn`.`worker` SET bossFk = 20 WHERE id = 1 OR id = 9; UPDATE `vn`.`worker` SET bossFk = 19 WHERE id = 18;