-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PSP_PIMS | Development Sprint: S97.00 | Design Sprint: 96 | Date: 2024-Dec-23 - Added tables: - PIMS_PROJECT_TEAM_HIST - PIMS_COMP_REQ_PAYEE_HIST - PIMS_COMP_REQ_PAYEE - PIMS_PROJECT_TEAM - Altered tables: - PIMS_COMPENSATION_REQUISITION - PIMS_COMPENSATION_REQUISITION_HIST - Altered seed scripts: - 007_PSP_PIMS_COMPENSATION_REQUISITION_HIST_Add.sql - Altered test scripts: - 048_PIMS_COMPENSATION_REQUISITION.sql - Requires additional metadata to meet standards
- Loading branch information
Showing
236 changed files
with
94,258 additions
and
11,194 deletions.
There are no files selected for viewing
1,085 changes: 241 additions & 844 deletions
1,085
...e/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/002_PSP_PIMS_Alter_Down.sql
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
...ce/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/011_DML_PIMS_ROLE_NAME.sql
This file was deleted.
Oops, something went wrong.
110 changes: 110 additions & 0 deletions
110
...ts/dbscripts/PSP_PIMS_LATEST/Alter Down/157_DML_PIMS_SUBFILE_INTEREST_TYPE_Alter_Down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* ----------------------------------------------------------------------------- | ||
Alter the data in the PIMS_SUBFILE_INTEREST_TYPE table. | ||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | ||
Author Date Comment | ||
------------ ----------- ----------------------------------------------------- | ||
Doug Filteau 2024-Dec-19 Initial version. | ||
----------------------------------------------------------------------------- */ | ||
|
||
SET XACT_ABORT ON | ||
GO | ||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE | ||
GO | ||
BEGIN TRANSACTION | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
-- Update the "TENANT" type | ||
PRINT N'Update the "TENANT" type' | ||
GO | ||
DECLARE @CurrCd NVARCHAR(20) | ||
SET @CurrCd = N'TENANT' | ||
|
||
SELECT SUBFILE_INTEREST_TYPE_CODE | ||
FROM PIMS_SUBFILE_INTEREST_TYPE | ||
WHERE SUBFILE_INTEREST_TYPE_CODE = @CurrCd; | ||
|
||
IF @@ROWCOUNT = 1 | ||
UPDATE PIMS_SUBFILE_INTEREST_TYPE | ||
SET DESCRIPTION = N'Tenant (Monthly) Leaseholder' | ||
, CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 | ||
WHERE SUBFILE_INTEREST_TYPE_CODE = @CurrCd; | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
-- Update/insert the "LSHOLDR" type | ||
PRINT N'Update the "LSHOLDR" type' | ||
GO | ||
DECLARE @CurrCd NVARCHAR(20) | ||
SET @CurrCd = N'LSHOLDR' | ||
|
||
SELECT SUBFILE_INTEREST_TYPE_CODE | ||
FROM PIMS_SUBFILE_INTEREST_TYPE | ||
WHERE SUBFILE_INTEREST_TYPE_CODE = @CurrCd; | ||
|
||
IF @@ROWCOUNT = 1 | ||
UPDATE PIMS_SUBFILE_INTEREST_TYPE | ||
SET IS_DISABLED = 1 | ||
, CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 | ||
WHERE SUBFILE_INTEREST_TYPE_CODE = @CurrCd; | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
-- Disable the "MOBILE" type | ||
PRINT N'Disable the "MOBILE" type' | ||
GO | ||
DECLARE @CurrCd NVARCHAR(20) | ||
SET @CurrCd = N'MOBILE' | ||
|
||
SELECT SUBFILE_INTEREST_TYPE_CODE | ||
FROM PIMS_SUBFILE_INTEREST_TYPE | ||
WHERE SUBFILE_INTEREST_TYPE_CODE = @CurrCd; | ||
|
||
IF @@ROWCOUNT = 1 | ||
UPDATE PIMS_SUBFILE_INTEREST_TYPE | ||
SET IS_DISABLED = 1 | ||
, CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 | ||
WHERE SUBFILE_INTEREST_TYPE_CODE = @CurrCd; | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
-- -------------------------------------------------------------- | ||
-- Update the display order with the exception of the OTHER type. | ||
-- -------------------------------------------------------------- | ||
UPDATE prt | ||
SET prt.DISPLAY_ORDER = seq.ROW_NUM | ||
, prt.CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 | ||
FROM PIMS_SUBFILE_INTEREST_TYPE prt JOIN | ||
(SELECT SUBFILE_INTEREST_TYPE_CODE | ||
, ROW_NUMBER() OVER (ORDER BY DESCRIPTION) AS ROW_NUM | ||
FROM PIMS_SUBFILE_INTEREST_TYPE | ||
WHERE SUBFILE_INTEREST_TYPE_CODE <> N'OTHER') seq ON seq.SUBFILE_INTEREST_TYPE_CODE = prt.SUBFILE_INTEREST_TYPE_CODE | ||
WHERE prt.SUBFILE_INTEREST_TYPE_CODE <> N'OTHER' | ||
GO | ||
|
||
-- -------------------------------------------------------------- | ||
-- Set the OTHER type to always appear at the end of the list. | ||
-- -------------------------------------------------------------- | ||
UPDATE PIMS_SUBFILE_INTEREST_TYPE | ||
SET DISPLAY_ORDER = 999 | ||
, CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 | ||
WHERE SUBFILE_INTEREST_TYPE_CODE = N'OTHER' | ||
GO | ||
|
||
COMMIT TRANSACTION | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
DECLARE @Success AS BIT | ||
SET @Success = 1 | ||
SET NOEXEC OFF | ||
IF (@Success = 1) PRINT 'The database update succeeded' | ||
ELSE BEGIN | ||
IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION | ||
PRINT 'The database update failed' | ||
END | ||
GO |
42 changes: 42 additions & 0 deletions
42
...l/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/998_Migrate_Comp_Req_Payees_Alter_Down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* ----------------------------------------------------------------------------- | ||
Migrate the data for the compensation requisition payees. | ||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | ||
Author Date Comment | ||
------------ ----------- ----------------------------------------------------- | ||
Doug Filteau 2024-Dec-24 Initial version. | ||
----------------------------------------------------------------------------- */ | ||
|
||
SET XACT_ABORT ON | ||
GO | ||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE | ||
GO | ||
BEGIN TRANSACTION | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
-- Migrate the data for the compensation requisition payees | ||
PRINT N'Migrate the data for the compensation requisition payees' | ||
GO | ||
UPDATE req | ||
SET req.ACQUISITION_OWNER_ID = pay.ACQUISITION_OWNER_ID | ||
, req.INTEREST_HOLDER_ID = pay.INTEREST_HOLDER_ID | ||
, req.ACQUISITION_FILE_TEAM_ID = pay.ACQUISITION_FILE_TEAM_ID | ||
, req.CONCURRENCY_CONTROL_NUMBER = req.CONCURRENCY_CONTROL_NUMBER + 1 | ||
FROM PIMS_COMP_REQ_PAYEE pay JOIN | ||
PIMS_COMPENSATION_REQUISITION req ON req.COMPENSATION_REQUISITION_ID = pay.COMPENSATION_REQUISITION_ID | ||
GO | ||
|
||
COMMIT TRANSACTION | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
DECLARE @Success AS BIT | ||
SET @Success = 1 | ||
SET NOEXEC OFF | ||
IF (@Success = 1) PRINT 'The database update succeeded' | ||
ELSE BEGIN | ||
IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION | ||
PRINT 'The database update failed' | ||
END | ||
GO |
46 changes: 46 additions & 0 deletions
46
...l/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/999_DML_PIMS_COMP_REQ_PAYEE_Alter_Down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* ----------------------------------------------------------------------------- | ||
Drop the PIMS_COMP_REQ_PAYEE table. | ||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | ||
Author Date Comment | ||
------------ ----------- ----------------------------------------------------- | ||
Doug Filteau 2024-Dec-24 Initial version. | ||
----------------------------------------------------------------------------- */ | ||
|
||
SET XACT_ABORT ON | ||
GO | ||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE | ||
GO | ||
BEGIN TRANSACTION | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
-- Drop table dbo.PIMS_COMP_REQ_PAYEE | ||
PRINT N'Drop table dbo.PIMS_COMP_REQ_PAYEE' | ||
GO | ||
DROP TABLE IF EXISTS [dbo].[PIMS_COMP_REQ_PAYEE] | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
-- Drop sequence dbo.PIMS_COMP_REQ_PAYEE_ID_SEQ | ||
PRINT N'Drop sequence dbo.PIMS_COMP_REQ_PAYEE_ID_SEQ' | ||
GO | ||
DROP SEQUENCE IF EXISTS [dbo].[PIMS_COMP_REQ_PAYEE_ID_SEQ] | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
COMMIT TRANSACTION | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
DECLARE @Success AS BIT | ||
SET @Success = 1 | ||
SET NOEXEC OFF | ||
IF (@Success = 1) PRINT 'The database update succeeded' | ||
ELSE BEGIN | ||
IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION | ||
PRINT 'The database update failed' | ||
END | ||
GO |
Binary file modified
BIN
+36.8 KB
(100%)
source/database/mssql/scripts/dbscripts/PSP_PIMS_LATEST/Alter Down/Schema Compare.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.