15 lines
884 B
SQL
15 lines
884 B
SQL
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
|
|
) 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');
|