salix/db/changes/10480-june/01-claimObservation.sql

13 lines
740 B
MySQL
Raw Normal View History

CREATE TABLE `vn`.`claimObservation` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`claimFk` 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`),
KEY `worker_key` (`workerFk`),
KEY `claim_key` (`claimFk`),
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
) COMMENT='Todas las observaciones referentes a una reclamación'