---- Tabella DocumentiRighe campo IDIVA  ---

IF NOT EXISTS(SELECT 1
FROM sysobjects,
syscolumns
WHERE sysobjects.id = syscolumns.id
AND sysobjects.name = 'TipiDocumento'
AND syscolumns.name = 'FAEL_TipoDocumento')
ALTER TABLE dbo.TipiDocumento ADD
	[FAEL_TipoDocumento] [varchar](1) NOT NULL CONSTRAINT [DF_TipiDocumento_FAEL_TipoDocumento]  DEFAULT ('')
GO


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

GO