From c3cdb1019509b5474c56921a5d49097a9d308b95 Mon Sep 17 00:00:00 2001 From: devinleighsmith Date: Fri, 25 Aug 2023 11:37:51 -0700 Subject: [PATCH] restoring updated version of PIMS_USER seed script, overriden in IS60. --- .../Test Data/038_PIMS_USER.sql | 284 +++++++++++++++++- .../Test Data/038_PIMS_USER.sql | 284 +++++++++++++++++- 2 files changed, 544 insertions(+), 24 deletions(-) diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Test Data/038_PIMS_USER.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Test Data/038_PIMS_USER.sql index 805ea1736c..9ed31dc61e 100644 --- a/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Test Data/038_PIMS_USER.sql +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Test Data/038_PIMS_USER.sql @@ -4,7 +4,9 @@ DECLARE @alejandroPersonId bigint; DECLARE @manuelPersonId bigint; -DECLARE @maheshPersonId bigint; +DECLARE @eduardoPersonId bigint; + +DECLARE @amanPersonId bigint; INSERT INTO [dbo].[PIMS_PERSON] ( @@ -49,8 +51,18 @@ VALUES 'seed_data' ), ( - 'Babu', - 'Mahesh', + 'Herrera', + 'Eduardo', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + 'Monga', + 'Aman', 'seed_data', 'seed_data', 'seed_data', @@ -90,13 +102,23 @@ SET ); SET - @maheshPersonId = ( + @eduardoPersonId = ( + SELECT + TOP(1) PERSON_ID + FROM + PIMS_PERSON + WHERE + SURNAME = 'Herrera' AND FIRST_NAME = 'Eduardo' + ); + +SET + @amanPersonId = ( SELECT TOP(1) PERSON_ID FROM PIMS_PERSON WHERE - SURNAME = 'Babu' AND FIRST_NAME = 'Mahesh' + SURNAME = 'Monga' AND FIRST_NAME = 'Aman' ); INSERT INTO @@ -106,6 +128,7 @@ INSERT INTO [GUID_IDENTIFIER_VALUE], [IS_DISABLED], [ISSUE_DATE], + [USER_TYPE_CODE], [APP_CREATE_USERID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_USERID], @@ -120,6 +143,7 @@ VALUES '7DB28007-0D47-4EF0-BB46-C365A4B95A73', 0, CURRENT_TIMESTAMP, + 'MINSTAFF', 'seed_data', 'seed_data', 'seed_data', @@ -133,6 +157,7 @@ VALUES '4109E6B4-585C-4678-8A24-1A99B45E3A5D', 0, CURRENT_TIMESTAMP, + 'MINSTAFF', 'seed_data', 'seed_data', 'seed_data', @@ -146,6 +171,7 @@ VALUES '5D661D1E-14F0-477C-A7FB-31F21E8B4FDA', 0, CURRENT_TIMESTAMP, + 'MINSTAFF', 'seed_data', 'seed_data', 'seed_data', @@ -154,11 +180,26 @@ VALUES 'seed_data' ), ( - @maheshPersonId, - 'mbabu', - '672D88FC-61B9-4D6B-824A-83B5186E39C6', + @eduardoPersonId, + 'eherrera', + '939A27D0-76CD-49B0-B474-53166ADB73DA', 0, CURRENT_TIMESTAMP, + 'MINSTAFF', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @amanPersonId, + 'amonga', + 'E4240183-82D2-4CB7-BA7E-84E7067CB14A', + 0, + CURRENT_TIMESTAMP, + 'MINSTAFF', 'seed_data', 'seed_data', 'seed_data', @@ -173,7 +214,8 @@ DECLARE @systemAdmin bigint; DECLARE @devinUserId bigint; DECLARE @alejandroUserId bigint; DECLARE @manuelUserId bigint; -DECLARE @maheshUserId bigint; +DECLARE @eduardoUserId bigint; +DECLARE @amanUserId bigint; SET @systemAdmin = ( @@ -213,13 +255,22 @@ SET BUSINESS_IDENTIFIER_VALUE = 'marodrig' ); SET - @maheshUserId = ( + @eduardoUserId = ( SELECT TOP(1) USER_ID FROM PIMS_USER WHERE - BUSINESS_IDENTIFIER_VALUE = 'mbabu' + BUSINESS_IDENTIFIER_VALUE = 'eherrera' + ); +SET + @amanUserId = ( + SELECT + TOP(1) USER_ID + FROM + PIMS_USER + WHERE + BUSINESS_IDENTIFIER_VALUE = 'amonga' ); INSERT INTO @@ -265,7 +316,7 @@ VALUES 'seed_data' ), ( - @maheshUserId, + @eduardoUserId, @systemAdmin, 'seed_data', 'seed_data', @@ -273,4 +324,213 @@ VALUES 'seed_data', 'seed_data', 'seed_data' + ), + ( + @amanUserId, + @systemAdmin, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ); + +DECLARE @southCoast bigint; + +DECLARE @southInterior bigint; + +DECLARE @northern bigint; + +SET + @southCoast = ( + SELECT + TOP(1) REGION_CODE + FROM + PIMS_REGION + WHERE + REGION_NAME = 'South Coast Region' + ); + +SET + @southInterior = ( + SELECT + TOP(1) REGION_CODE + FROM + PIMS_REGION + WHERE + REGION_NAME = 'Southern Interior Region' + ); + +SET + @northern = ( + SELECT + TOP(1) REGION_CODE + FROM + PIMS_REGION + WHERE + REGION_NAME = 'Northern Region' + ); + +INSERT INTO + [dbo].[PIMS_REGION_USER] ( + [USER_ID], + [REGION_CODE], + [APP_CREATE_USERID], + [APP_CREATE_USER_DIRECTORY], + [APP_LAST_UPDATE_USERID], + [APP_LAST_UPDATE_USER_DIRECTORY], + [DB_CREATE_USERID], + [DB_LAST_UPDATE_USERID] + ) +VALUES + ( + @devinUserId, + @southCoast, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @devinUserId, + @southInterior, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @devinUserId, + @northern, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @alejandroUserId, + @southCoast, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @alejandroUserId, + @southInterior, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @alejandroUserId, + @northern, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @manuelUserId, + @southCoast, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @manuelUserId, + @southInterior, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @manuelUserId, + @northern, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @eduardoUserId, + @southCoast, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @eduardoUserId, + @southInterior, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @eduardoUserId, + @northern, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @amanUserId, + @southCoast, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @amanUserId, + @southInterior, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @amanUserId, + @northern, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' ); \ No newline at end of file diff --git a/source/database/mssql/scripts/dbscripts/PSP_PIMS_S61_00/Test Data/038_PIMS_USER.sql b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S61_00/Test Data/038_PIMS_USER.sql index 805ea1736c..9ed31dc61e 100644 --- a/source/database/mssql/scripts/dbscripts/PSP_PIMS_S61_00/Test Data/038_PIMS_USER.sql +++ b/source/database/mssql/scripts/dbscripts/PSP_PIMS_S61_00/Test Data/038_PIMS_USER.sql @@ -4,7 +4,9 @@ DECLARE @alejandroPersonId bigint; DECLARE @manuelPersonId bigint; -DECLARE @maheshPersonId bigint; +DECLARE @eduardoPersonId bigint; + +DECLARE @amanPersonId bigint; INSERT INTO [dbo].[PIMS_PERSON] ( @@ -49,8 +51,18 @@ VALUES 'seed_data' ), ( - 'Babu', - 'Mahesh', + 'Herrera', + 'Eduardo', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + 'Monga', + 'Aman', 'seed_data', 'seed_data', 'seed_data', @@ -90,13 +102,23 @@ SET ); SET - @maheshPersonId = ( + @eduardoPersonId = ( + SELECT + TOP(1) PERSON_ID + FROM + PIMS_PERSON + WHERE + SURNAME = 'Herrera' AND FIRST_NAME = 'Eduardo' + ); + +SET + @amanPersonId = ( SELECT TOP(1) PERSON_ID FROM PIMS_PERSON WHERE - SURNAME = 'Babu' AND FIRST_NAME = 'Mahesh' + SURNAME = 'Monga' AND FIRST_NAME = 'Aman' ); INSERT INTO @@ -106,6 +128,7 @@ INSERT INTO [GUID_IDENTIFIER_VALUE], [IS_DISABLED], [ISSUE_DATE], + [USER_TYPE_CODE], [APP_CREATE_USERID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_USERID], @@ -120,6 +143,7 @@ VALUES '7DB28007-0D47-4EF0-BB46-C365A4B95A73', 0, CURRENT_TIMESTAMP, + 'MINSTAFF', 'seed_data', 'seed_data', 'seed_data', @@ -133,6 +157,7 @@ VALUES '4109E6B4-585C-4678-8A24-1A99B45E3A5D', 0, CURRENT_TIMESTAMP, + 'MINSTAFF', 'seed_data', 'seed_data', 'seed_data', @@ -146,6 +171,7 @@ VALUES '5D661D1E-14F0-477C-A7FB-31F21E8B4FDA', 0, CURRENT_TIMESTAMP, + 'MINSTAFF', 'seed_data', 'seed_data', 'seed_data', @@ -154,11 +180,26 @@ VALUES 'seed_data' ), ( - @maheshPersonId, - 'mbabu', - '672D88FC-61B9-4D6B-824A-83B5186E39C6', + @eduardoPersonId, + 'eherrera', + '939A27D0-76CD-49B0-B474-53166ADB73DA', 0, CURRENT_TIMESTAMP, + 'MINSTAFF', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @amanPersonId, + 'amonga', + 'E4240183-82D2-4CB7-BA7E-84E7067CB14A', + 0, + CURRENT_TIMESTAMP, + 'MINSTAFF', 'seed_data', 'seed_data', 'seed_data', @@ -173,7 +214,8 @@ DECLARE @systemAdmin bigint; DECLARE @devinUserId bigint; DECLARE @alejandroUserId bigint; DECLARE @manuelUserId bigint; -DECLARE @maheshUserId bigint; +DECLARE @eduardoUserId bigint; +DECLARE @amanUserId bigint; SET @systemAdmin = ( @@ -213,13 +255,22 @@ SET BUSINESS_IDENTIFIER_VALUE = 'marodrig' ); SET - @maheshUserId = ( + @eduardoUserId = ( SELECT TOP(1) USER_ID FROM PIMS_USER WHERE - BUSINESS_IDENTIFIER_VALUE = 'mbabu' + BUSINESS_IDENTIFIER_VALUE = 'eherrera' + ); +SET + @amanUserId = ( + SELECT + TOP(1) USER_ID + FROM + PIMS_USER + WHERE + BUSINESS_IDENTIFIER_VALUE = 'amonga' ); INSERT INTO @@ -265,7 +316,7 @@ VALUES 'seed_data' ), ( - @maheshUserId, + @eduardoUserId, @systemAdmin, 'seed_data', 'seed_data', @@ -273,4 +324,213 @@ VALUES 'seed_data', 'seed_data', 'seed_data' + ), + ( + @amanUserId, + @systemAdmin, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ); + +DECLARE @southCoast bigint; + +DECLARE @southInterior bigint; + +DECLARE @northern bigint; + +SET + @southCoast = ( + SELECT + TOP(1) REGION_CODE + FROM + PIMS_REGION + WHERE + REGION_NAME = 'South Coast Region' + ); + +SET + @southInterior = ( + SELECT + TOP(1) REGION_CODE + FROM + PIMS_REGION + WHERE + REGION_NAME = 'Southern Interior Region' + ); + +SET + @northern = ( + SELECT + TOP(1) REGION_CODE + FROM + PIMS_REGION + WHERE + REGION_NAME = 'Northern Region' + ); + +INSERT INTO + [dbo].[PIMS_REGION_USER] ( + [USER_ID], + [REGION_CODE], + [APP_CREATE_USERID], + [APP_CREATE_USER_DIRECTORY], + [APP_LAST_UPDATE_USERID], + [APP_LAST_UPDATE_USER_DIRECTORY], + [DB_CREATE_USERID], + [DB_LAST_UPDATE_USERID] + ) +VALUES + ( + @devinUserId, + @southCoast, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @devinUserId, + @southInterior, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @devinUserId, + @northern, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @alejandroUserId, + @southCoast, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @alejandroUserId, + @southInterior, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @alejandroUserId, + @northern, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @manuelUserId, + @southCoast, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @manuelUserId, + @southInterior, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @manuelUserId, + @northern, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @eduardoUserId, + @southCoast, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @eduardoUserId, + @southInterior, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @eduardoUserId, + @northern, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @amanUserId, + @southCoast, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @amanUserId, + @southInterior, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' + ), + ( + @amanUserId, + @northern, + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data', + 'seed_data' ); \ No newline at end of file