From 3556151942e264a5e20a413679a4d64a712f2014 Mon Sep 17 00:00:00 2001 From: devinleighsmith Date: Thu, 19 Dec 2024 20:25:37 -0800 Subject: [PATCH 1/2] Add alter ups to change the name of the PIMS_ROLEs for lease/license --- .../Alter Down/011_DML_PIMS_ROLE_NAME.sql | 15 +++++++++++++++ .../PSP_PIMS_S96_00/Alter Down/master.sql | 3 +++ .../Alter Up/164_DML_PIMS_ROLE_NAME.sql | 15 +++++++++++++++ .../dbscripts/PSP_PIMS_S96_00/Alter Up/master.sql | 3 +++ 4 files changed, 36 insertions(+) create mode 100644 source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Down/011_DML_PIMS_ROLE_NAME.sql create mode 100644 source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Up/164_DML_PIMS_ROLE_NAME.sql diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Down/011_DML_PIMS_ROLE_NAME.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Down/011_DML_PIMS_ROLE_NAME.sql new file mode 100644 index 0000000000..43678b5d3d --- /dev/null +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Down/011_DML_PIMS_ROLE_NAME.sql @@ -0,0 +1,15 @@ +UPDATE + PIMS_ROLE +SET + NAME = 'Lease/License functional', + CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 +WHERE + NAME = 'Lease License functional'; + +UPDATE + PIMS_ROLE +SET + NAME = 'Lease/License read-only', + CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 +WHERE + NAME = 'Lease License read-only'; \ No newline at end of file diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Down/master.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Down/master.sql index 36b93b5073..03de4bef69 100644 --- a/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Down/master.sql +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Down/master.sql @@ -20,6 +20,9 @@ PRINT ' == DB TRANSACTION START ========' PRINT '- Executing PSP_PIMS_S96_00/Alter Down/010_DML_PIMS_STATIC_VARIABLE_VERSION.sql ' :setvar filepath "PSP_PIMS_S96_00/Alter Down/010_DML_PIMS_STATIC_VARIABLE_VERSION.sql" :r $(filepath) + PRINT '- Executing PSP_PIMS_S96_00/Alter Down/011_DML_PIMS_ROLE_NAME.sql ' + :setvar filepath "PSP_PIMS_S96_00/Alter Down/011_DML_PIMS_ROLE_NAME.sql" + :r $(filepath) --End script section diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Up/164_DML_PIMS_ROLE_NAME.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Up/164_DML_PIMS_ROLE_NAME.sql new file mode 100644 index 0000000000..fb047ac47a --- /dev/null +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Up/164_DML_PIMS_ROLE_NAME.sql @@ -0,0 +1,15 @@ +UPDATE + PIMS_ROLE +SET + NAME = 'Lease License functional', + CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 +WHERE + NAME = 'Lease/License functional'; + +UPDATE + PIMS_ROLE +SET + NAME = 'Lease License read-only', + CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 +WHERE + NAME = 'Lease/License read-only'; \ No newline at end of file diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Up/master.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Up/master.sql index adac2a5c9e..2c2b1d8216 100644 --- a/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Up/master.sql +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Alter Up/master.sql @@ -35,6 +35,9 @@ PRINT ' == DB TRANSACTION START ========' PRINT '- Executing PSP_PIMS_S96_00/Alter Up/163_DML_PIMS_ACQ_FILE_EXPROP_RISK_TYPE.sql ' :setvar filepath "PSP_PIMS_S96_00/Alter Up/163_DML_PIMS_ACQ_FILE_EXPROP_RISK_TYPE.sql" :r $(filepath) + PRINT '- Executing PSP_PIMS_S96_00/Alter Up/164_DML_PIMS_ROLE_NAME.sql ' + :setvar filepath "PSP_PIMS_S96_00/Alter Up/164_DML_PIMS_ROLE_NAME.sql" + :r $(filepath) --End script section From d9286a87a26ec29638b7cc575760079a553d1caa Mon Sep 17 00:00:00 2001 From: devinleighsmith Date: Mon, 23 Dec 2024 23:07:18 -0800 Subject: [PATCH 2/2] add changes to role to build/latest --- .../Alter Down/011_DML_PIMS_ROLE_NAME.sql | 15 +++++++++++++++ .../PSP_PIMS_LATEST/Alter Down/master.sql | 3 +++ .../Alter Up/164_DML_PIMS_ROLE_NAME.sql | 15 +++++++++++++++ .../dbscripts/PSP_PIMS_LATEST/Alter Up/master.sql | 3 +++ .../PSP_PIMS_LATEST/Build/051_DML_PIMS_ROLE.sql | 4 ++-- .../PSP_PIMS_S96_00/Build/051_DML_PIMS_ROLE.sql | 4 ++-- 6 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/011_DML_PIMS_ROLE_NAME.sql create mode 100644 source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Up/164_DML_PIMS_ROLE_NAME.sql diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/011_DML_PIMS_ROLE_NAME.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/011_DML_PIMS_ROLE_NAME.sql new file mode 100644 index 0000000000..43678b5d3d --- /dev/null +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/011_DML_PIMS_ROLE_NAME.sql @@ -0,0 +1,15 @@ +UPDATE + PIMS_ROLE +SET + NAME = 'Lease/License functional', + CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 +WHERE + NAME = 'Lease License functional'; + +UPDATE + PIMS_ROLE +SET + NAME = 'Lease/License read-only', + CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 +WHERE + NAME = 'Lease License read-only'; \ No newline at end of file diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/master.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/master.sql index 36b93b5073..03de4bef69 100644 --- a/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/master.sql +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/master.sql @@ -20,6 +20,9 @@ PRINT ' == DB TRANSACTION START ========' PRINT '- Executing PSP_PIMS_S96_00/Alter Down/010_DML_PIMS_STATIC_VARIABLE_VERSION.sql ' :setvar filepath "PSP_PIMS_S96_00/Alter Down/010_DML_PIMS_STATIC_VARIABLE_VERSION.sql" :r $(filepath) + PRINT '- Executing PSP_PIMS_S96_00/Alter Down/011_DML_PIMS_ROLE_NAME.sql ' + :setvar filepath "PSP_PIMS_S96_00/Alter Down/011_DML_PIMS_ROLE_NAME.sql" + :r $(filepath) --End script section diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Up/164_DML_PIMS_ROLE_NAME.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Up/164_DML_PIMS_ROLE_NAME.sql new file mode 100644 index 0000000000..fb047ac47a --- /dev/null +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Up/164_DML_PIMS_ROLE_NAME.sql @@ -0,0 +1,15 @@ +UPDATE + PIMS_ROLE +SET + NAME = 'Lease License functional', + CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 +WHERE + NAME = 'Lease/License functional'; + +UPDATE + PIMS_ROLE +SET + NAME = 'Lease License read-only', + CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 +WHERE + NAME = 'Lease/License read-only'; \ No newline at end of file diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Up/master.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Up/master.sql index adac2a5c9e..2c2b1d8216 100644 --- a/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Up/master.sql +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Up/master.sql @@ -35,6 +35,9 @@ PRINT ' == DB TRANSACTION START ========' PRINT '- Executing PSP_PIMS_S96_00/Alter Up/163_DML_PIMS_ACQ_FILE_EXPROP_RISK_TYPE.sql ' :setvar filepath "PSP_PIMS_S96_00/Alter Up/163_DML_PIMS_ACQ_FILE_EXPROP_RISK_TYPE.sql" :r $(filepath) + PRINT '- Executing PSP_PIMS_S96_00/Alter Up/164_DML_PIMS_ROLE_NAME.sql ' + :setvar filepath "PSP_PIMS_S96_00/Alter Up/164_DML_PIMS_ROLE_NAME.sql" + :r $(filepath) --End script section diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Build/051_DML_PIMS_ROLE.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Build/051_DML_PIMS_ROLE.sql index 92558b4d52..64b67d3ebb 100644 --- a/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Build/051_DML_PIMS_ROLE.sql +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Build/051_DML_PIMS_ROLE.sql @@ -7,8 +7,8 @@ VALUES (NEWID(), N'Undetermined', N'The user has an undetermined role with their organization.', CONVERT([bit],(0)), CONVERT([bit],(1)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), (NEWID(), N'Acquisition functional', N'Access to create, read, update Acquisition files.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), (NEWID(), N'Acquisition read-only', N'Access to read Acquisition files.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), - (NEWID(), N'Lease/License functional', N'Access to create, read, update Leases/Licenses files.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), - (NEWID(), N'Lease/License read-only', N'Access to read lease/license.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), + (NEWID(), N'Lease License functional', N'Access to create, read, update Leases/Licenses files.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), + (NEWID(), N'Lease License read-only', N'Access to read lease/license.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), (NEWID(), N'Project functional', N'Access to create, read, update projects.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), (NEWID(), N'Project read-only', N'Access to read Projects.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), (NEWID(), N'Research functional', N'Access to create, read, update Research files.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Build/051_DML_PIMS_ROLE.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Build/051_DML_PIMS_ROLE.sql index 92558b4d52..64b67d3ebb 100644 --- a/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Build/051_DML_PIMS_ROLE.sql +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S96_00/Build/051_DML_PIMS_ROLE.sql @@ -7,8 +7,8 @@ VALUES (NEWID(), N'Undetermined', N'The user has an undetermined role with their organization.', CONVERT([bit],(0)), CONVERT([bit],(1)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), (NEWID(), N'Acquisition functional', N'Access to create, read, update Acquisition files.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), (NEWID(), N'Acquisition read-only', N'Access to read Acquisition files.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), - (NEWID(), N'Lease/License functional', N'Access to create, read, update Leases/Licenses files.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), - (NEWID(), N'Lease/License read-only', N'Access to read lease/license.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), + (NEWID(), N'Lease License functional', N'Access to create, read, update Leases/Licenses files.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), + (NEWID(), N'Lease License read-only', N'Access to read lease/license.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), (NEWID(), N'Project functional', N'Access to create, read, update projects.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), (NEWID(), N'Project read-only', N'Access to read Projects.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'), (NEWID(), N'Research functional', N'Access to create, read, update Research files.', CONVERT([bit],(1)), CONVERT([bit],(0)), 0, CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data', CURRENT_TIMESTAMP, N'Seed Data', N'Seed Data'),