
---- Tabella Documenti campo IDTipoPagamento  ---

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


---- Tabella Documenti campo IDDitta  ---

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