IF NOT EXISTS(SELECT * FROM sys.columns WHERE object_id = OBJECT_ID('CAFE_ADISYON') AND name='Fk_FaturaId')
	ALTER TABLE CAFE_ADISYON ADD Fk_FaturaId INT NULL DEFAULT 0;

GO

UPDATE CAFE_ADISYON SET Fk_FaturaId=0 WHERE Fk_FaturaId IS NULL;

GO

IF NOT EXISTS(SELECT * FROM sys.columns WHERE object_id = OBJECT_ID('FATURALAR') AND name='Fk_CafeAdisyonId')
	ALTER TABLE FATURALAR ADD Fk_CafeAdisyonId INT NULL DEFAULT 0;

GO

UPDATE FATURALAR SET Fk_CafeAdisyonId=0 WHERE Fk_CafeAdisyonId IS NULL;

GO