
---- Tabella Documenti campo Email_Inviata---

IF NOT EXISTS(SELECT 1
FROM sysobjects,
syscolumns
WHERE sysobjects.id = syscolumns.id
AND sysobjects.name = 'Documenti'
AND syscolumns.name = 'Email_Inviata')
ALTER TABLE dbo.Documenti ADD
	[Email_Inviata] [int] NOT NULL CONSTRAINT [DF_Documenti_Email_Inviata]  DEFAULT ((0))
GO


---- Tabella Documenti campo Email_DataInvio---

IF NOT EXISTS(SELECT 1
FROM sysobjects,
syscolumns
WHERE sysobjects.id = syscolumns.id
AND sysobjects.name = 'Documenti'
AND syscolumns.name = 'Email_DataInvio')
ALTER TABLE dbo.Documenti ADD
	 [Email_DataInvio] [datetime] NOT NULL CONSTRAINT [DF_Documenti_Email_DataInvio]  DEFAULT ((''))
GO


---- Tabella Documenti campo Email_ConPDF  ---

IF NOT EXISTS(SELECT 1
FROM sysobjects,
syscolumns
WHERE sysobjects.id = syscolumns.id
AND sysobjects.name = 'Documenti'
AND syscolumns.name = 'Email_ConPDF')
ALTER TABLE dbo.Documenti ADD
	 [Email_ConPDF] [bit] NOT NULL CONSTRAINT [DF_Documenti_Email_ConPDF]  DEFAULT ((0))
GO