From fc9d2c5893ed24045e3d4838432a0b47918c852b Mon Sep 17 00:00:00 2001 From: Marco Villeneuve Date: Thu, 11 Jul 2024 11:38:44 -0700 Subject: [PATCH] Added new roles for school & district read only SDC --- .../db/migration/V1.0.48__EDX_API.sql | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 api/src/main/resources/db/migration/V1.0.48__EDX_API.sql diff --git a/api/src/main/resources/db/migration/V1.0.48__EDX_API.sql b/api/src/main/resources/db/migration/V1.0.48__EDX_API.sql new file mode 100644 index 00000000..dc994a19 --- /dev/null +++ b/api/src/main/resources/db/migration/V1.0.48__EDX_API.sql @@ -0,0 +1,43 @@ +UPDATE EDX_ROLE +SET label = 'Superintendent' +WHERE EDX_ROLE_CODE = 'SUPERINT'; + +UPDATE EDX_ROLE +SET label = 'Secretary Treasurer' +WHERE EDX_ROLE_CODE = 'SECR_TRES'; + +INSERT INTO EDX_ROLE (EDX_ROLE_CODE, LABEL, IS_DISTRICT_ROLE, DESCRIPTION, CREATE_USER, UPDATE_USER) +VALUES ('DIS_SDC_RO', 'District 1701 Read-Only', TRUE, '1701 Read-Only role for District.', 'IDIR/MVILLENE', 'IDIR/MVILLENE'); + +INSERT INTO EDX_ROLE (EDX_ROLE_CODE, LABEL, IS_DISTRICT_ROLE, DESCRIPTION, CREATE_USER, UPDATE_USER) +VALUES ('SCH_SDC_RO', 'School 1701 Read-Only', TRUE, '1701 Read-Only role for School.', 'IDIR/MVILLENE', 'IDIR/MVILLENE'); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'SCH_SDC_RO', 'SCH_SDC_RO', 'IDIR/MVILLENE', + to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/MVILLENE', to_date('2019-11-07', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'DIS_SDC_RO', 'SCH_SDC_RO', 'IDIR/MVILLENE', + to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/MVILLENE', to_date('2019-11-07', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'DIS_SDC_RO', 'DIS_SDC_RO', 'IDIR/MVILLENE', + to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/MVILLENE', to_date('2019-11-07', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'SCH_SDC_RO', 'EDX_SCHOOL_VIEW', 'IDIR/MVILLENE', + to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/MVILLENE', to_date('2019-11-07', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'DIS_SDC_RO', 'EDX_SCHOOL_VIEW', 'IDIR/MVILLENE', + to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/MVILLENE', to_date('2019-11-07', 'YYYY-MM-DD')); + +INSERT INTO EDX_ROLE_PERMISSION (EDX_ROLE_PERMISSION_ID, EDX_ROLE_CODE, EDX_PERMISSION_CODE, CREATE_USER, CREATE_DATE, + UPDATE_USER, UPDATE_DATE) +VALUES (gen_random_uuid(), 'DIS_SDC_RO', 'EDX_DISTRICT_VIEW', 'IDIR/MVILLENE', + to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/MVILLENE', to_date('2019-11-07', 'YYYY-MM-DD'));