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

IS-84.00 Updated Test Scripts #4155

Merged
merged 9 commits into from
Jul 5, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,8 @@ GO
PRINT N'Alter table dbo.PIMS_PROPERTY_ACTIVITY_HIST'
GO
ALTER TABLE [dbo].[PIMS_PROPERTY_ACTIVITY_HIST]
ADD [DESCRIPTION] nvarchar(2000) NULL
ALTER COLUMN [DESCRIPTION] nvarchar(2000) NULL
-- ADD [DESCRIPTION] nvarchar(2000) NULL
GO
IF @@ERROR <> 0 SET NOEXEC ON
GO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,8 @@ GO
PRINT N'Alter table dbo.PIMS_PROPERTY_ACTIVITY_HIST'
GO
ALTER TABLE [dbo].[PIMS_PROPERTY_ACTIVITY_HIST]
DROP COLUMN IF EXISTS [DESCRIPTION]
ALTER COLUMN [DESCRIPTION] nvarchar(max) NULL
-- DROP COLUMN IF EXISTS [DESCRIPTION] ***REMOVE***
GO
IF @@ERROR <> 0 SET NOEXEC ON
GO
Expand Down Expand Up @@ -2718,8 +2719,8 @@ SET @curr_date = getutcdate();
update PIMS_PROPERTY_ACTIVITY_HIST set END_DATE_HIST = @curr_date where PIMS_PROPERTY_ACTIVITY_ID in (select PIMS_PROPERTY_ACTIVITY_ID from deleted) and END_DATE_HIST is null;

IF EXISTS(SELECT * FROM inserted)
insert into PIMS_PROPERTY_ACTIVITY_HIST ([PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], _PROPERTY_ACTIVITY_HIST_ID, END_DATE_HIST, EFFECTIVE_DATE_HIST)
select [PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], (next value for [dbo].[PIMS_PROPERTY_ACTIVITY_H_ID_SEQ]) as [_PROPERTY_ACTIVITY_HIST_ID], null as [END_DATE_HIST], @curr_date as [EFFECTIVE_DATE_HIST] from inserted;
insert into PIMS_PROPERTY_ACTIVITY_HIST ([PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [DESCRIPTION], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], _PROPERTY_ACTIVITY_HIST_ID, END_DATE_HIST, EFFECTIVE_DATE_HIST)
select [PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [DESCRIPTION], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], (next value for [dbo].[PIMS_PROPERTY_ACTIVITY_H_ID_SEQ]) as [_PROPERTY_ACTIVITY_HIST_ID], null as [END_DATE_HIST], @curr_date as [EFFECTIVE_DATE_HIST] from inserted;

END TRY
BEGIN CATCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14551,6 +14551,7 @@ CREATE TABLE [dbo].[PIMS_PROPERTY_ACTIVITY_HIST] (
[SERVICE_PROVIDER_ORG_ID] bigint NULL,
[REQUEST_ADDED_DT] date NOT NULL,
[COMPLETION_DT] date NULL,
[DESCRIPTION] nvarchar(max) NULL,
[REQUEST_SOURCE] nvarchar(2000) NULL,
[IS_DISABLED] bit NULL,
[CONCURRENCY_CONTROL_NUMBER] bigint NOT NULL,
Expand Down Expand Up @@ -29637,8 +29638,8 @@ SET @curr_date = getutcdate();
update PIMS_PROPERTY_ACTIVITY_HIST set END_DATE_HIST = @curr_date where PIMS_PROPERTY_ACTIVITY_ID in (select PIMS_PROPERTY_ACTIVITY_ID from deleted) and END_DATE_HIST is null;

IF EXISTS(SELECT * FROM inserted)
insert into PIMS_PROPERTY_ACTIVITY_HIST ([PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], _PROPERTY_ACTIVITY_HIST_ID, END_DATE_HIST, EFFECTIVE_DATE_HIST)
select [PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], (next value for [dbo].[PIMS_PROPERTY_ACTIVITY_H_ID_SEQ]) as [_PROPERTY_ACTIVITY_HIST_ID], null as [END_DATE_HIST], @curr_date as [EFFECTIVE_DATE_HIST] from inserted;
insert into PIMS_PROPERTY_ACTIVITY_HIST ([PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [DESCRIPTION], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], _PROPERTY_ACTIVITY_HIST_ID, END_DATE_HIST, EFFECTIVE_DATE_HIST)
select [PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [DESCRIPTION], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], (next value for [dbo].[PIMS_PROPERTY_ACTIVITY_H_ID_SEQ]) as [_PROPERTY_ACTIVITY_HIST_ID], null as [END_DATE_HIST], @curr_date as [EFFECTIVE_DATE_HIST] from inserted;

END TRY
BEGIN CATCH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
INSERT INTO PIMS_LEASE_PERIOD (LEASE_ID, PERIOD_START_DATE, PAYMENT_TYPE, PERIOD_DURATION)
INSERT INTO PIMS_LEASE_PERIOD (LEASE_ID, PERIOD_START_DATE, IS_VARIABLE_PAYMENT, IS_FLEXIBLE_DURATION)
VALUES
((SELECT TOP 1 LEASE_ID FROM PIMS_LEASE ORDER BY NEWID()), CONVERT(NVARCHAR, GETUTCDATE()), 0, 0),
((SELECT TOP 1 LEASE_ID FROM PIMS_LEASE ORDER BY NEWID()), CONVERT(NVARCHAR, GETUTCDATE()), 0, 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DELETE
FROM PIMS_DISPOSITION_CHECKLIST_ITEM
GO

INSERT INTO dbo.PIMS_DISPOSITION_CHECKLIST_ITEM(DISPOSITION_FILE_ID, DSP_CHKLST_ITEM_TYPE_CODE, DSP_CHKLST_ITEM_STATUS_TYPE_CODE, CONCURRENCY_CONTROL_NUMBER, APP_CREATE_TIMESTAMP, APP_CREATE_USERID, APP_CREATE_USER_GUID, APP_CREATE_USER_DIRECTORY, APP_LAST_UPDATE_TIMESTAMP, APP_LAST_UPDATE_USERID, APP_LAST_UPDATE_USER_GUID, APP_LAST_UPDATE_USER_DIRECTORY)
INSERT INTO dbo.PIMS_DISPOSITION_CHECKLIST_ITEM(DISPOSITION_FILE_ID, DSP_CHKLST_ITEM_TYPE_CODE, CHKLST_ITEM_STATUS_TYPE_CODE, CONCURRENCY_CONTROL_NUMBER, APP_CREATE_TIMESTAMP, APP_CREATE_USERID, APP_CREATE_USER_GUID, APP_CREATE_USER_DIRECTORY, APP_LAST_UPDATE_TIMESTAMP, APP_LAST_UPDATE_USERID, APP_LAST_UPDATE_USER_GUID, APP_LAST_UPDATE_USER_DIRECTORY)
VALUES
( 5, N'UTILCOREF', N'INCOMP', 1, getutcdate(), N'FOUGSTER', NEWID(), N'FOUGSTER', getutcdate(), N'FOUGSTER', NEWID(), N'FOUGSTER'),
( 5, N'1STNATION', N'NOTAPP', 1, getutcdate(), N'FOUGSTER', NEWID(), N'FOUGSTER', getutcdate(), N'FOUGSTER', NEWID(), N'FOUGSTER'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DELETE
FROM PIMS_LEASE_CHECKLIST_ITEM;
GO

INSERT INTO PIMS_LEASE_CHECKLIST_ITEM (LEASE_ID, LEASE_CHKLST_ITEM_TYPE_CODE, LEASE_CHKLST_ITEM_STATUS_TYPE_CODE, CONCURRENCY_CONTROL_NUMBER, APP_CREATE_TIMESTAMP, APP_CREATE_USERID, APP_CREATE_USER_GUID, APP_CREATE_USER_DIRECTORY, APP_LAST_UPDATE_TIMESTAMP, APP_LAST_UPDATE_USERID, APP_LAST_UPDATE_USER_GUID, APP_LAST_UPDATE_USER_DIRECTORY)
INSERT INTO PIMS_LEASE_CHECKLIST_ITEM (LEASE_ID, LEASE_CHKLST_ITEM_TYPE_CODE, CHKLST_ITEM_STATUS_TYPE_CODE, CONCURRENCY_CONTROL_NUMBER, APP_CREATE_TIMESTAMP, APP_CREATE_USERID, APP_CREATE_USER_GUID, APP_CREATE_USER_DIRECTORY, APP_LAST_UPDATE_TIMESTAMP, APP_LAST_UPDATE_USERID, APP_LAST_UPDATE_USER_GUID, APP_LAST_UPDATE_USER_DIRECTORY)
VALUES
(46, N'RAHQ', N'COMPLT', 1, getutcdate(), N'FOUGSTER', '84A9124F-A258-4BFE-86E5-D9FF6825F045', N'FOUGSTER', getutcdate(), N'FOUGSTER', 'DDD9DD28-0D43-4518-86E7-7DDE0367A400', N'FOUGSTER'),
(53, N'APDRAFTAGG', N'COMPLT', 1, getutcdate(), N'FOUGSTER', '6398B937-1593-453E-9334-74552AB702B9', N'FOUGSTER', getutcdate(), N'FOUGSTER', '29B48E8B-1814-4984-956A-25A2AD92CBB8', N'FOUGSTER'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,8 @@ GO
PRINT N'Alter table dbo.PIMS_PROPERTY_ACTIVITY_HIST'
GO
ALTER TABLE [dbo].[PIMS_PROPERTY_ACTIVITY_HIST]
ADD [DESCRIPTION] nvarchar(2000) NULL
ALTER COLUMN [DESCRIPTION] nvarchar(2000) NULL
-- ADD [DESCRIPTION] nvarchar(2000) NULL
GO
IF @@ERROR <> 0 SET NOEXEC ON
GO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,8 @@ GO
PRINT N'Alter table dbo.PIMS_PROPERTY_ACTIVITY_HIST'
GO
ALTER TABLE [dbo].[PIMS_PROPERTY_ACTIVITY_HIST]
DROP COLUMN IF EXISTS [DESCRIPTION]
ALTER COLUMN [DESCRIPTION] nvarchar(max) NULL
-- DROP COLUMN IF EXISTS [DESCRIPTION] ***REMOVE***
GO
IF @@ERROR <> 0 SET NOEXEC ON
GO
Expand Down Expand Up @@ -2718,8 +2719,8 @@ SET @curr_date = getutcdate();
update PIMS_PROPERTY_ACTIVITY_HIST set END_DATE_HIST = @curr_date where PIMS_PROPERTY_ACTIVITY_ID in (select PIMS_PROPERTY_ACTIVITY_ID from deleted) and END_DATE_HIST is null;

IF EXISTS(SELECT * FROM inserted)
insert into PIMS_PROPERTY_ACTIVITY_HIST ([PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], _PROPERTY_ACTIVITY_HIST_ID, END_DATE_HIST, EFFECTIVE_DATE_HIST)
select [PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], (next value for [dbo].[PIMS_PROPERTY_ACTIVITY_H_ID_SEQ]) as [_PROPERTY_ACTIVITY_HIST_ID], null as [END_DATE_HIST], @curr_date as [EFFECTIVE_DATE_HIST] from inserted;
insert into PIMS_PROPERTY_ACTIVITY_HIST ([PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [DESCRIPTION], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], _PROPERTY_ACTIVITY_HIST_ID, END_DATE_HIST, EFFECTIVE_DATE_HIST)
select [PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [DESCRIPTION], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], (next value for [dbo].[PIMS_PROPERTY_ACTIVITY_H_ID_SEQ]) as [_PROPERTY_ACTIVITY_HIST_ID], null as [END_DATE_HIST], @curr_date as [EFFECTIVE_DATE_HIST] from inserted;

END TRY
BEGIN CATCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14551,6 +14551,7 @@ CREATE TABLE [dbo].[PIMS_PROPERTY_ACTIVITY_HIST] (
[SERVICE_PROVIDER_ORG_ID] bigint NULL,
[REQUEST_ADDED_DT] date NOT NULL,
[COMPLETION_DT] date NULL,
[DESCRIPTION] nvarchar(max) NULL,
[REQUEST_SOURCE] nvarchar(2000) NULL,
[IS_DISABLED] bit NULL,
[CONCURRENCY_CONTROL_NUMBER] bigint NOT NULL,
Expand Down Expand Up @@ -29637,8 +29638,8 @@ SET @curr_date = getutcdate();
update PIMS_PROPERTY_ACTIVITY_HIST set END_DATE_HIST = @curr_date where PIMS_PROPERTY_ACTIVITY_ID in (select PIMS_PROPERTY_ACTIVITY_ID from deleted) and END_DATE_HIST is null;

IF EXISTS(SELECT * FROM inserted)
insert into PIMS_PROPERTY_ACTIVITY_HIST ([PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], _PROPERTY_ACTIVITY_HIST_ID, END_DATE_HIST, EFFECTIVE_DATE_HIST)
select [PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], (next value for [dbo].[PIMS_PROPERTY_ACTIVITY_H_ID_SEQ]) as [_PROPERTY_ACTIVITY_HIST_ID], null as [END_DATE_HIST], @curr_date as [EFFECTIVE_DATE_HIST] from inserted;
insert into PIMS_PROPERTY_ACTIVITY_HIST ([PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [DESCRIPTION], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], _PROPERTY_ACTIVITY_HIST_ID, END_DATE_HIST, EFFECTIVE_DATE_HIST)
select [PIMS_PROPERTY_ACTIVITY_ID], [PROP_MGMT_ACTIVITY_TYPE_CODE], [PROP_MGMT_ACTIVITY_SUBTYPE_CODE], [PROP_MGMT_ACTIVITY_STATUS_TYPE_CODE], [SERVICE_PROVIDER_PERSON_ID], [SERVICE_PROVIDER_ORG_ID], [REQUEST_ADDED_DT], [COMPLETION_DT], [DESCRIPTION], [REQUEST_SOURCE], [IS_DISABLED], [CONCURRENCY_CONTROL_NUMBER], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USERID], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [DB_CREATE_TIMESTAMP], [DB_CREATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], (next value for [dbo].[PIMS_PROPERTY_ACTIVITY_H_ID_SEQ]) as [_PROPERTY_ACTIVITY_HIST_ID], null as [END_DATE_HIST], @curr_date as [EFFECTIVE_DATE_HIST] from inserted;

END TRY
BEGIN CATCH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
INSERT INTO PIMS_LEASE_PERIOD (LEASE_ID, PERIOD_START_DATE, PAYMENT_TYPE, PERIOD_DURATION)
INSERT INTO PIMS_LEASE_PERIOD (LEASE_ID, PERIOD_START_DATE, IS_VARIABLE_PAYMENT, IS_FLEXIBLE_DURATION)
VALUES
((SELECT TOP 1 LEASE_ID FROM PIMS_LEASE ORDER BY NEWID()), CONVERT(NVARCHAR, GETUTCDATE()), 0, 0),
((SELECT TOP 1 LEASE_ID FROM PIMS_LEASE ORDER BY NEWID()), CONVERT(NVARCHAR, GETUTCDATE()), 0, 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DELETE
FROM PIMS_DISPOSITION_CHECKLIST_ITEM
GO

INSERT INTO dbo.PIMS_DISPOSITION_CHECKLIST_ITEM(DISPOSITION_FILE_ID, DSP_CHKLST_ITEM_TYPE_CODE, DSP_CHKLST_ITEM_STATUS_TYPE_CODE, CONCURRENCY_CONTROL_NUMBER, APP_CREATE_TIMESTAMP, APP_CREATE_USERID, APP_CREATE_USER_GUID, APP_CREATE_USER_DIRECTORY, APP_LAST_UPDATE_TIMESTAMP, APP_LAST_UPDATE_USERID, APP_LAST_UPDATE_USER_GUID, APP_LAST_UPDATE_USER_DIRECTORY)
INSERT INTO dbo.PIMS_DISPOSITION_CHECKLIST_ITEM(DISPOSITION_FILE_ID, DSP_CHKLST_ITEM_TYPE_CODE, CHKLST_ITEM_STATUS_TYPE_CODE, CONCURRENCY_CONTROL_NUMBER, APP_CREATE_TIMESTAMP, APP_CREATE_USERID, APP_CREATE_USER_GUID, APP_CREATE_USER_DIRECTORY, APP_LAST_UPDATE_TIMESTAMP, APP_LAST_UPDATE_USERID, APP_LAST_UPDATE_USER_GUID, APP_LAST_UPDATE_USER_DIRECTORY)
VALUES
( 5, N'UTILCOREF', N'INCOMP', 1, getutcdate(), N'FOUGSTER', NEWID(), N'FOUGSTER', getutcdate(), N'FOUGSTER', NEWID(), N'FOUGSTER'),
( 5, N'1STNATION', N'NOTAPP', 1, getutcdate(), N'FOUGSTER', NEWID(), N'FOUGSTER', getutcdate(), N'FOUGSTER', NEWID(), N'FOUGSTER'),
Expand Down
Loading
Loading