<commit_before>﻿/*
 Pre-Deployment Script Template							
--------------------------------------------------------------------------------------
 This file contains SQL statements that will be executed before the build script.	
 Use SQLCMD syntax to include a file in the pre-deployment script.			
 Example:      :r .\myfile.sql								
 Use SQLCMD syntax to reference a variable in the pre-deployment script.		
 Example:      :setvar TableName MyTable							
               SELECT * FROM [$(TableName)]					
--------------------------------------------------------------------------------------
*/


--CV-565: Update old records that were created before the capture of AccountLegalEntityId
update c set
c.AccountLegalEntityId = ale.Id
from
Commitment c
join AccountLegalEntities ale on ale.PublicHashedId = c.AccountLegalEntityPublicHashedId
where c.AccountLegalEntityId IS NULL<commit_msg>Adds script to mop up old left over procs<commit_after>﻿/*
 Pre-Deployment Script Template							
--------------------------------------------------------------------------------------
 This file contains SQL statements that will be executed before the build script.	
 Use SQLCMD syntax to include a file in the pre-deployment script.			
 Example:      :r .\myfile.sql								
 Use SQLCMD syntax to reference a variable in the pre-deployment script.		
 Example:      :setvar TableName MyTable							
               SELECT * FROM [$(TableName)]					
--------------------------------------------------------------------------------------
*/


--CV-565: Update old records that were created before the capture of AccountLegalEntityId
update c set
c.AccountLegalEntityId = ale.Id
from
Commitment c
join AccountLegalEntities ale on ale.PublicHashedId = c.AccountLegalEntityPublicHashedId
where c.AccountLegalEntityId IS NULL


--Remove leftover procs
DROP PROCEDURE IF EXISTS [dbo].[SetTransferRequestApproval]
DROP PROCEDURE IF EXISTS [dbo].[GetApprovedApprenticeship]
DROP PROCEDURE IF EXISTS [dbo].[SetTransferApproval]
DROP PROCEDURE IF EXISTS [dbo].[StartATransferRequest]
DROP PROCEDURE IF EXISTS [dbo].[SetPaymentOrder]
DROP PROCEDURE IF EXISTS [dbo].[GetActiveApprenticeshipsForProvider]
DROP PROCEDURE IF EXISTS [dbo].[GetActiveApprenticeshipsForEmployer]









{'fraction_non_alphanumeric': 0.20230190349712263, 'fraction_numerical': 0.0026560424966799467, 'mean_word_length': 2.0173564753004007, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6001310', 'n_tokens_mistral': 640, 'n_tokens_neox': 540, 'n_words': 203}