/***************************************************************************
* Copyright (C) 2025 DataKings / Kers IT All rights reserved.
'***************************************************************************/


delete from DDTests where TableName = 'CSEasyWMDefActions' and FieldName = 'Moment'
go

insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, Options, SeqNr) values('S', 'CSEasyWMDefActions', 'Moment', 'S', 'After single document', 421111, '', 0)
insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, Options, SeqNr) values('M', 'CSEasyWMDefActions', 'Moment', 'M', 'After creating all documents', 421112, '', 1)
go


if not exists(select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'CSEasyWMIntegrationPages' and COLUMN_NAME = 'MyWorkflow')
begin
	alter table [dbo].[CSEasyWMIntegrationPages]
		add [MyWorkflow] tinyint NOT NULL default(0)
end
go

if not exists(select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'CSEasyWMIntegrationPages' and COLUMN_NAME = 'SaveRequestFirst')
begin
	alter table [dbo].[CSEasyWMIntegrationPages]
		add [SaveRequestFirst] tinyint NOT NULL default(0)
end
go

if not exists(select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'CSEasyWMDefSelection' and COLUMN_NAME = 'Enabled')
begin
	alter table [dbo].[CSEasyWMDefSelection]
		add [Enabled] tinyint NOT NULL default(1)
end
go