IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'STS_VALID' AND OBJECT_ID = OBJECT_ID('PDV_VD_NFCE'))
BEGIN
	ALTER TABLE [DBO].PDV_VD_NFCE ADD
	STS_VALID INT NULL

	ALTER TABLE [DBO].PDV_VD_NFCE ADD CONSTRAINT
	DF_PDV_VD_NFCE_STS_VALID DEFAULT 0 FOR STS_VALID
END 