feat: refs #8016 Created userRole
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Guillermo Bonet 2025-01-07 14:35:49 +01:00
parent b68ffb0819
commit 8190e22d51
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
CREATE TABLE account.`userRole` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`userFk` int(10) unsigned NOT NULL,
`roleFk` int(10) unsigned NOT NULL,
`hasGrant` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `userRole_user_FK` (`userFk`),
KEY `userRole_role_FK` (`roleFk`),
CONSTRAINT `userRole_role_FK` FOREIGN KEY (`roleFk`) REFERENCES `role` (`id`) ON UPDATE CASCADE,
CONSTRAINT `userRole_user_FK` FOREIGN KEY (`userFk`) REFERENCES `user` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
ALTER TABLE account.`user` CHANGE `role` role__ int(10) unsigned DEFAULT 2 NOT NULL COMMENT '@deprecated 2025-01-07';