2023-03-22 09:21:15 +00:00
|
|
|
CREATE TABLE `vn`.`workerObservation` (
|
|
|
|
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`workerFk` int(10) unsigned DEFAULT NULL,
|
|
|
|
`userFk` int(10) unsigned DEFAULT NULL,
|
|
|
|
`text` text COLLATE utf8mb3_unicode_ci NOT NULL,
|
|
|
|
`created` timestamp NOT NULL DEFAULT current_timestamp(),
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
CONSTRAINT `workerFk_workerObservation_FK` FOREIGN KEY (`workerFk`) REFERENCES `vn`.`worker` (`id`) ON UPDATE CASCADE,
|
|
|
|
CONSTRAINT `userFk_workerObservation_FK` FOREIGN KEY (`userFk`) REFERENCES `account`.`user`(`id`) ON UPDATE CASCADE
|
2023-03-24 11:11:42 +00:00
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Todas las observaciones referentes a un trabajador';
|
|
|
|
|
|
|
|
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
|
|
|
|
VALUES
|
|
|
|
('WorkerObservation', '*', '*', 'ALLOW', 'ROLE', 'hr');
|