From 2eb0e776852daae5f08a1338d570bbaa9fcafa81 Mon Sep 17 00:00:00 2001 From: kelvinsuen Date: Thu, 31 Jul 2025 16:06:31 +0800 Subject: [PATCH] update authority sql --- .../11_update_authority/01_update_authority.sql | 15 +++++++++++++++ .../02_update_authority_group_authority.sql | 10 ++++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/main/resources/db/changelog/changes/11_update_authority/01_update_authority.sql create mode 100644 src/main/resources/db/changelog/changes/11_update_authority/02_update_authority_group_authority.sql diff --git a/src/main/resources/db/changelog/changes/11_update_authority/01_update_authority.sql b/src/main/resources/db/changelog/changes/11_update_authority/01_update_authority.sql new file mode 100644 index 0000000..ed80369 --- /dev/null +++ b/src/main/resources/db/changelog/changes/11_update_authority/01_update_authority.sql @@ -0,0 +1,15 @@ +--liquibase formatted sql + +--changeset kelvin:update authority + +TRUNCATE `lionerdb`.`authority`; +INSERT INTO `lionerdb`.`authority` (`authority`, `name`, `module`, `description`) VALUES +('VIEW_CLIENT', 'View Client', 'Client', 'Allow to view client'), +('MAINTAIN_CLIENT', 'Maintain Client', 'Client', 'Allow to view client'), +('VIEW_USER', 'View User', 'System Administration', 'Allow to view user'), +('MAINTAIN_USER', 'Maintain User', 'System Administration', 'Allow to maintain user'), +('VIEW_LOGIN_LOG', 'View Login Log', 'System Administration', 'Allow to view login log'), +('VIEW_TEMPLATE', 'View Template', 'Template', 'Allow to view template'), +('MAINTAIN_TEMPLATE', 'Maintain Template', 'Template', 'Allow to maintain template'), +('VIEW_SYSTEM_CONFIGURATION', 'View System Configuration', 'System Administration', 'Allow to view system configuration'), +('MANAGE_SYSTEM_CONFIGURATION', 'Manage System Configuration', 'System Administration', 'Allow to manage system configuration'); \ No newline at end of file diff --git a/src/main/resources/db/changelog/changes/11_update_authority/02_update_authority_group_authority.sql b/src/main/resources/db/changelog/changes/11_update_authority/02_update_authority_group_authority.sql new file mode 100644 index 0000000..fd3bc9f --- /dev/null +++ b/src/main/resources/db/changelog/changes/11_update_authority/02_update_authority_group_authority.sql @@ -0,0 +1,10 @@ +--liquibase formatted sql + +--changeset kelvin:update group authority + +TRUNCATE `lionerdb`.`user_authority`; +TRUNCATE `lionerdb`.`group_authority`; +INSERT INTO `lionerdb`.`group_authority` (`groupId`, `authId`) VALUES +('1', '1'),('1', '2'), +('2', '3'),('2', '4'),('2', '5'),('2', '8'),('2', '9'), +('3', '1'),('3', '2'),('3', '3'),('3', '4'),('3', '5'),('3', '6'),('3', '7'),('3', '8'),('3', '9'); \ No newline at end of file