IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ISLEMPERYODUGUN' AND SYSOBJECTS.name = 'TITEM')
ALTER TABLE dbo.[TITEM] ADD ISLEMPERYODUGUN integer NOT NULL CONSTRAINT [DF_TITEM_ISLEMPERYODUGUN]  DEFAULT ((365))
go

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ISLEMSMSFARKGUNU' AND SYSOBJECTS.name = 'TITEM')
ALTER TABLE dbo.[TITEM] ADD ISLEMSMSFARKGUNU integer NOT NULL CONSTRAINT [DF_TITEM_ISLEMSMSFARKGUNU]  DEFAULT ((0))

go
IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ISLEMCARIID' AND SYSOBJECTS.name = 'TITEM')
ALTER TABLE dbo.[TITEM] ADD ISLEMCARIID integer null
go
IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ISLEMSMSSABLONU' AND SYSOBJECTS.name = 'TITEM')
ALTER TABLE dbo.[TITEM] ADD ISLEMSMSSABLONU NVARCHAR(300) null
go

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ISLEMDOSYAACIKLAMASI' AND SYSOBJECTS.name = 'TITEM')
ALTER TABLE dbo.[TITEM] ADD ISLEMDOSYAACIKLAMASI NVARCHAR(100) null
go

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'ISLEMTEKRARAKTIF' AND SYSOBJECTS.name = 'TITEM')
ALTER TABLE dbo.TITEM ADD
	ISLEMTEKRARAKTIF bit NOT NULL CONSTRAINT [DF_TITEM_ISLEMTEKRARAKTIF] DEFAULT (0)
go
