salix/db/versions/10841-orangeGalax/00-entryDms.sql

16 lines
797 B
MySQL
Raw Permalink Normal View History

CREATE OR REPLACE TABLE `vn`.`entryDms` (
`entryFk` int(11) NOT NULL,
`dmsFk` int(11) NOT NULL,
`editorFk` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`entryFk`,`dmsFk`),
KEY `gestdoc_id` (`dmsFk`),
KEY `entryDms_editor` (`editorFk`),
CONSTRAINT `entryDms_dms` FOREIGN KEY (`dmsFk`) REFERENCES `dms` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `entryDms_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`),
CONSTRAINT `entryDms_entry` FOREIGN KEY (`entryFk`) REFERENCES `entry` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
VALUES
2024-02-23 06:39:56 +00:00
('EntryDms', '*', '*', 'ALLOW', 'ROLE', 'employee');