<commit_before>﻿-----------------------------------------------------------------
------------  Enables parameterized subscriptions  -------------
-----------------------------------------------------------------

---------------------------
-- Table : DataChangeEvent
---------------------------

IF NOT EXISTS (SELECT * FROM sys.columns c WHERE name = 'PersonRegistrationId' and object_id=object_id('DataChangeEvent'))
	ALTER TABLE dbo.DataChangeEvent ADD PersonRegistrationId UNIQUEIDENTIFIER NOT NULL
GO

------------------------------
-- Table : PersonRegistration
------------------------------

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE name= 'IX_PersonRegistration_UUID' AND object_id = object_id('PersonRegistration'))
	CREATE NONCLUSTERED INDEX [IX_PersonRegistration_UUID] ON [dbo].[PersonRegistration] ([UUID] ASC)
	WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

<commit_msg>Added DROP queries for getting rid of unused tables.<commit_after>﻿-----------------------------------------------------------------
------------  Enables parameterized subscriptions  -------------
-----------------------------------------------------------------

---------------------------
-- Table : DataChangeEvent
---------------------------

IF NOT EXISTS (SELECT * FROM sys.columns c WHERE name = 'PersonRegistrationId' and object_id=object_id('DataChangeEvent'))
	ALTER TABLE dbo.DataChangeEvent ADD PersonRegistrationId UNIQUEIDENTIFIER NOT NULL
GO

------------------------------
-- Table : PersonRegistration
------------------------------

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE name= 'IX_PersonRegistration_UUID' AND object_id = object_id('PersonRegistration'))
	CREATE NONCLUSTERED INDEX [IX_PersonRegistration_UUID] ON [dbo].[PersonRegistration] ([UUID] ASC)
	WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO


------------------------------
-- Table : ExtractPersonStaging
------------------------------

CREATE NONCLUSTERED INDEX [IX_ExtractPersonStaging_ExtractId] ON [dbo].[ExtractPersonStaging] 
(
	[ExtractId] ASC
)WITH (STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

----------------------------------------------------------
-- Getting rid of unused tables
----------------------------------------------------------

drop table dbo.PersonLifeState
drop table dbo.PersonCivilState
drop table dbo.PersonState
drop table dbo.PersonRelationship
drop table dbo.UnknownCitizenData
drop table dbo.PersonName
drop table dbo.PersonProperties
drop table dbo.HealthInformation
drop table dbo.ForeignCitizenCountry
drop table dbo.ForeignCitizenData
drop table dbo.CprData
drop table dbo.PersonAttributes
drop table dbo.ForeignAddress
drop table dbo.GreenlandicAddress
drop table dbo.GeographicCoorditaneTuple
drop table dbo.GeographicPointLocation
drop table dbo.AddressPointStatus
drop table dbo.AddressPoint
drop table dbo.DanishAddress
drop table dbo.DenmarkAddress
drop table dbo.Address
GO
{'fraction_non_alphanumeric': 0.2636363636363636, 'fraction_numerical': 0.0, 'mean_word_length': 1.9005102040816326, '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': '7490048', 'n_tokens_mistral': 968, 'n_tokens_neox': 929, 'n_words': 243}