if object_id('CSEasyVerifyPreviousValues') is null
begin
	CREATE TABLE [dbo].[CSEasyVerifyPreviousValues](
		[ID] [uniqueidentifier] NOT NULL,
		[BusinessComponent] [nvarchar](30) NOT NULL,
		[PropName] [nvarchar](40) NOT NULL,
		[SysCreated] [datetime] NOT NULL,
	 CONSTRAINT [PK_CSEasyVerifyPreviousValues] PRIMARY KEY CLUSTERED 
	(
		[ID] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
	) ON [PRIMARY]
end
GO

if not exists(select * from CSEasyVerifyPreviousValues)
begin
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('C0F9FAA5-4771-4C4F-9018-345F08816FBF', 'Employee', 'AccessStatus', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('C1F9FAA5-4771-4C4F-9018-345F08816FBF', 'Employee', 'Status', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('C2F9FAA5-4771-4C4F-9018-345F08816FBF', 'Employee', 'Type', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('C3F9FAA5-4771-4C4F-9018-345F08816FBF', 'Employee', 'EmploymentEnd', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('C4F9FAA5-4771-4C4F-9018-345F08816FBF', 'Employee', 'EmploymentStart', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('C5F9FAA5-4771-4C4F-9018-345F08816FBF', 'Employee', 'ContractEnd', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('C6F9FAA5-4771-4C4F-9018-345F08816FBF', 'Employee', 'EmailPersonal', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('C7F9FAA5-4771-4C4F-9018-345F08816FBF', 'Employee', 'EmailWork', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('C8F9FAA5-4771-4C4F-9018-345F08816FBF', 'Employee', 'Division', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('C9F9FAA5-4771-4C4F-9018-345F08816FBF', 'Employee', 'FullName', getdate())

	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('D0F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'CustomerStatus', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('D1F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'CustomerType', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('D2F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'Email', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('D3F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'MailAddress', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('D4F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'MailAddress2', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('D5F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'MailAddress3', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('D6F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'MailPostcode', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('D7F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'MailCity', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('D8F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'MailCountry', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('D9F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'ClassificationID', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('E0F9FAA5-4771-4C4F-9018-345F08816FBF', 'Associates', 'BankAccount', getdate())

	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('E1F9FAA5-4771-4C4F-9018-345F08816FBF', 'Contact', 'Active', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('E2F9FAA5-4771-4C4F-9018-345F08816FBF', 'Contact', 'Email', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('E3F9FAA5-4771-4C4F-9018-345F08816FBF', 'Contact', 'Mobile', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('E4F9FAA5-4771-4C4F-9018-345F08816FBF', 'Contact', 'Phone', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('E5F9FAA5-4771-4C4F-9018-345F08816FBF', 'Contact', 'FullName', getdate())

	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('E6F9FAA5-4771-4C4F-9018-345F08816FBF', 'Item', 'Assortment', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('E7F9FAA5-4771-4C4F-9018-345F08816FBF', 'Item', 'Condition', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('E8F9FAA5-4771-4C4F-9018-345F08816FBF', 'Item', 'CostPriceStandard', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('E9F9FAA5-4771-4C4F-9018-345F08816FBF', 'Item', 'Description', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('F0F9FAA5-4771-4C4F-9018-345F08816FBF', 'Item', 'ItemType', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('F1F9FAA5-4771-4C4F-9018-345F08816FBF', 'Item', 'Status', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('F2F9FAA5-4771-4C4F-9018-345F08816FBF', 'Item', 'Type', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('F3F9FAA5-4771-4C4F-9018-345F08816FBF', 'Item', 'SalesPackagePrice', getdate())

	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('F4F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'Billable', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('F5F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'Costcenter', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('F6F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'Costunit', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('F7F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'CustomerID', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('F8F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'Description', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('F9F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'Division', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A0F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'InvoiceTo', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A1F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'InitialStartDate', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A2F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'InitialEndDate', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A3F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'Status', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A4F9FAA5-4771-4C4F-9018-345F08816FBF', 'PRProject', 'Type', getdate())

	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A5F9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'Amount', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A6F9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'AmountActual', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A7F9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'CustomerID', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A8F9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'CustomerContactID', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A9F9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'Description', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('B0A9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'DocID', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('B1A9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'EndDate', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('B2A9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'EndDateActual', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('B3A9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'EmployeeID', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('B4A9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'Hours', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('B5A9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'HoursActual', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('B6A9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'ItemCode', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('B7A9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'ItemCount', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('B8A9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'ItemNumberID', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('B9A9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'ProjectNumber', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A0C9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'RelatedRequestID', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A1C9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'StartDate', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A2C9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'StartDateActual', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A3C9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'Status', getdate())

	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('05FF62F1-88FF-4790-8215-2F29D5C4EB39', 'BDDocument', 'Associate', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('35FF62F1-88FF-4790-8215-2F29D5C4EB39', 'BDDocument', 'Item', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('45FF62F1-88FF-4790-8215-2F29D5C4EB39', 'BDDocument', 'Person', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('55FF62F1-88FF-4790-8215-2F29D5C4EB39', 'BDDocument', 'ProjectNr', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('65FF62F1-88FF-4790-8215-2F29D5C4EB39', 'BDDocument', 'Type', getdate())

	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('4C070317-6B87-4412-89A0-92AA1BFF2207', 'DivisionDebtor', 'Division', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('5C070317-6B87-4412-89A0-92AA1BFF2207', 'DivisionDebtor', 'DebCode', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('6C070317-6B87-4412-89A0-92AA1BFF2207', 'DivisionDebtor', 'MainDebtor', getdate())

	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('4D070317-6B87-4412-89A0-92AA1BFF2207', 'DivisionCreditor', 'Division', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('5D070317-6B87-4412-89A0-92AA1BFF2207', 'DivisionCreditor', 'CrdCode', getdate())
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('6D070317-6B87-4412-89A0-92AA1BFF2207', 'DivisionCreditor', 'MainCreditor', getdate())
end
go



delete from DDTests where Tablename = 'CSEasyVerifyVerifications' and FieldName = 'Action'
go

if not exists(select * from DDTests where Tablename = 'CSEasyVerifyVerifications' and FieldName = 'Action')
begin
	insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, options, SeqNr) values('M', 'CSEasyVerifyVerifications', 'Action', 'M', 'Message', 1778, '', 0)
	insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, options, SeqNr) values('O', 'CSEasyVerifyVerifications', 'Action', 'O', 'BPA Platform (Orbis)', 0, '', 1)
	insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, options, SeqNr) values('S', 'CSEasyVerifyVerifications', 'Action', 'S', 'Stored Procedure', 0, '', 2)
	insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, options, SeqNr) values('T', 'CSEasyVerifyVerifications', 'Action', 'T', 'Tabel uitvoeren', 0, '', 3)
	insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, options, SeqNr) values('W', 'CSEasyVerifyVerifications', 'Action', 'W', 'Easy WordMerge', 0, '', 4)
	insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, options, SeqNr) values('A', 'CSEasyVerifyVerifications', 'Action', 'A', 'Access denied.', 10008, '', 5)
end
go


if not exists(select * from CSEasyVerifyPropertiesChanged where BusinessComponent = 'Request' and PropName = 'FollowUpDate')
begin
	insert into CSEasyVerifyPropertiesChanged(ID, BusinessComponent, PropName, SysCreated) values('A4C9EAA5-4661-4C3F-9018-345F08816FBF', 'Request', 'FollowUpDate', getdate())
end
go

if not exists(select * from CSEasyVerifyPreviousValues where BusinessComponent = 'Request' and PropName = 'FollowUpDate')
begin
	insert into CSEasyVerifyPreviousValues(ID, BusinessComponent, PropName, SysCreated) values('A4C9FAA5-4771-4C4F-9018-345F08816FBF', 'Request', 'FollowUpDate', getdate())
end
go
