if not exists(select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'CSEasyScriptSupportedPages' and COLUMN_NAME = 'IsMaintScreen')
begin
	ALTER TABLE [dbo].[CSEasyScriptSupportedPages]
		ADD [IsMaintScreen] [tinyint] NOT NULL DEFAULT(0)
end
go


if not exists(select * from [dbo].[CSEasyScriptSupportedPages] where ASPXPage = N'HRMResource.aspx')
begin
	insert into [dbo].[CSEasyScriptSupportedPages](ID, Caption, CaptionID, ASPXPage, DefaultColumn, IsMaintScreen)
	values(newId(), N'Resource', 12, N'HRMResource.aspx', N'Column1', 1)
end
go

if not exists(select * from [dbo].[CSEasyScriptSupportedPages] where ASPXPage = N'CRMAccountMaint.aspx')
begin
	insert into [dbo].[CSEasyScriptSupportedPages](ID, Caption, CaptionID, ASPXPage, DefaultColumn, IsMaintScreen)
	values(newId(), N'Account', 8, N'CRMAccountMaint.aspx', N'ccMain', 1)
end
go

if not exists(select * from [dbo].[CSEasyScriptSupportedPages] where ASPXPage = N'CRMPersonAccountMaint.aspx')
begin
	insert into [dbo].[CSEasyScriptSupportedPages](ID, Caption, CaptionID, ASPXPage, DefaultColumn, IsMaintScreen)
	values(newId(), N'Person', 8476, N'CRMPersonAccountMaint.aspx', N'ccMain', 1)
end
go

if not exists(select * from [dbo].[CSEasyScriptSupportedPages] where ASPXPage = N'ProEdit.aspx')
begin
	insert into [dbo].[CSEasyScriptSupportedPages](ID, Caption, CaptionID, ASPXPage, DefaultColumn, IsMaintScreen)
	values(newId(), N'Project', 8657, N'ProEdit.aspx', N'Row1Column1', 1)
end
go

if not exists(select * from [dbo].[CSEasyScriptSupportedPages] where ASPXPage = N'LogItem.aspx')
begin
	insert into [dbo].[CSEasyScriptSupportedPages](ID, Caption, CaptionID, ASPXPage, DefaultColumn, IsMaintScreen)
	values(newId(), N'Item', 8702, N'LogItem.aspx', N'Column1', 1)
end
go