 
GO
IF NOT EXISTS(SELECT 1 FROM syscolumns WHERE ID = OBJECT_ID('EST_NF_SAI_IT') AND NAME = 'VLR_CUSTO_MD')
BEGIN  
	ALTER TABLE dbo.EST_NF_SAI_IT ADD
		VLR_CUSTO_MD MONEY NULL
	 
	ALTER TABLE dbo.EST_NF_SAI_IT ADD CONSTRAINT
		DF_EST_NF_SAI_IT_VLR_CUSTO_MD DEFAULT 0 FOR VLR_CUSTO_MD
END
 
 
GO
IF NOT EXISTS(SELECT 1 FROM syscolumns WHERE ID = OBJECT_ID('PDV_VD_IT') AND NAME = 'VLR_CUSTO_MEDIO')
BEGIN  
	ALTER TABLE dbo.PDV_VD_IT ADD
		VLR_CUSTO_MEDIO MONEY NULL
	 
	ALTER TABLE dbo.PDV_VD_IT ADD CONSTRAINT
		DF_PDV_VD_IT_VLR_CUSTO_MEDIO DEFAULT 0 FOR VLR_CUSTO_MEDIO
END