Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restoring updated version of PIMS_USER seed script, overriden in IS60. #3446

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ DECLARE @alejandroPersonId bigint;

DECLARE @manuelPersonId bigint;

DECLARE @maheshPersonId bigint;
DECLARE @eduardoPersonId bigint;

DECLARE @amanPersonId bigint;

INSERT INTO
[dbo].[PIMS_PERSON] (
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand All @@ -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],
Expand All @@ -120,6 +143,7 @@ VALUES
'7DB28007-0D47-4EF0-BB46-C365A4B95A73',
0,
CURRENT_TIMESTAMP,
'MINSTAFF',
'seed_data',
'seed_data',
'seed_data',
Expand All @@ -133,6 +157,7 @@ VALUES
'4109E6B4-585C-4678-8A24-1A99B45E3A5D',
0,
CURRENT_TIMESTAMP,
'MINSTAFF',
'seed_data',
'seed_data',
'seed_data',
Expand All @@ -146,6 +171,7 @@ VALUES
'5D661D1E-14F0-477C-A7FB-31F21E8B4FDA',
0,
CURRENT_TIMESTAMP,
'MINSTAFF',
'seed_data',
'seed_data',
'seed_data',
Expand All @@ -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',
Expand All @@ -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 = (
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -265,12 +316,221 @@ VALUES
'seed_data'
),
(
@maheshUserId,
@eduardoUserId,
@systemAdmin,
'seed_data',
'seed_data',
'seed_data',
'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'
);
Loading
Loading