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


delete from DDTests where Tablename = 'CSEasyScriptSections' and FieldName = 'SectionType'
go

insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, Options, SeqNr) values('S', 'CSEasyScriptSections', 'SectionType', 'S', 'Section', 11133, '', 0)
insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, Options, SeqNr) values('T', 'CSEasyScriptSections', 'SectionType', 'T', 'Tab', 15938, '', 1)
insert into DDTests(DatabaseChar, Tablename, FieldName, DisplayChar, Description, TermId, Options, SeqNr) values('J', 'CSEasyScriptSections', 'SectionType', 'J', 'Script', 0, '', 2)
go


if not exists(select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'CSEasyScriptSections' and COLUMN_NAME = 'Connection')
begin
	alter table [dbo].[CSEasyScriptSections]
		add [Connection] nvarchar(30) NOT NULL default('Synergy')
end
go