IF NOT EXISTS (SELECT * FROM SYSOBJECTS
              WHERE  SYSOBJECTS.name = 'TRAPORSORGULAR')

CREATE TABLE [dbo].[TRAPORSORGULAR](
	[SCRIPTID] [int] IDENTITY(1,1) NOT NULL,
	[RAPORADI] [nvarchar](500) NULL,
	[SQLSTR] [nvarchar](max) NULL,
	[PASIF] [bit] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO 

IF NOT EXISTS (SELECT * FROM SYSOBJECTS
              WHERE  SYSOBJECTS.name = 'DF_TRAPORSORGULAR_PASIF')
ALTER TABLE [dbo].[TRAPORSORGULAR] ADD  CONSTRAINT [DF_TRAPORSORGULAR_PASIF]  DEFAULT ((0)) FOR [PASIF]
GO


