data migration from claim.observation to claimObservations
This commit is contained in:
parent
d183ccb843
commit
f1cb5a958c
|
@ -1,7 +1,7 @@
|
|||
CREATE TABLE `vn`.`claimObservation` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`claimFk` int(10) unsigned NOT NULL,
|
||||
`workerFk` int(10) unsigned NOT NULL,
|
||||
`workerFk` int(10) unsigned DEFAULT NULL,
|
||||
`text` text COLLATE utf8_unicode_ci NOT NULL,
|
||||
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
|
@ -10,4 +10,4 @@ CREATE TABLE `vn`.`claimObservation` (
|
|||
KEY `claimObservation_created_IDX` (`created`) USING BTREE,
|
||||
CONSTRAINT `claimObservation_ibfk_1` FOREIGN KEY (`claimFk`) REFERENCES `vn`.`claim` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `claimObservation_ibfk_2` FOREIGN KEY (`workerFk`) REFERENCES `vn`.`worker` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a una reclamación'
|
||||
) COMMENT='Todas las observaciones referentes a una reclamación'
|
|
@ -0,0 +1,2 @@
|
|||
INSERT INTO `vn`.`claimObservation` (`claimFk`, `text`, `created`)
|
||||
SELECT `id`, `observation`, `created` FROM `vn`.`claim`
|
Loading…
Reference in New Issue