-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into TM-196-LTM-Tasks-Integration
- Loading branch information
Showing
10 changed files
with
1,648 additions
and
17 deletions.
There are no files selected for viewing
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
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
20 changes: 20 additions & 0 deletions
20
....Employer_Account.Database/Scripts/Manual/CON-3968 Migrate And Add v7 Legal Agreement.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,20 @@ | ||
-- Replace all pending v3 / v4 / v5 / v6 agreements with pending v7 agreement | ||
UPDATE [employer_account].[EmployerAgreement] | ||
SET TemplateId = 8 | ||
WHERE TemplateId IN (4, 5, 6, 7) AND StatusId = 1 | ||
|
||
UPDATE [employer_account].[AccountLegalEntity] | ||
SET PendingAgreementVersion = 7 | ||
WHERE PendingAgreementVersion IN (3, 4, 5, 6) | ||
|
||
-- Create a pending v7 agreement for all account legal entities (except those that have them) | ||
INSERT INTO [employer_account].[EmployerAgreement] (TemplateId, StatusId, AccountLegalEntityId) | ||
SELECT 8, 1, Id | ||
FROM [employer_account].[AccountLegalEntity] | ||
WHERE PendingAgreementVersion IS NULL AND PendingAgreementId IS NULL AND Deleted IS NULL AND SignedAgreementVersion != 7 | ||
|
||
UPDATE ale | ||
SET PendingAgreementVersion = 7, PendingAgreementId = ea.Id | ||
FROM [employer_account].[AccountLegalEntity] ale | ||
JOIN [employer_account].[EmployerAgreement] ea ON ea.AccountLegalEntityId = ale.Id AND ea.TemplateId = 8 AND ea.StatusId = 1 | ||
WHERE PendingAgreementVersion IS NULL AND PendingAgreementId IS NULL AND Deleted IS NULL |
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
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
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
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
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.