IF NOT EXISTS(SELECT 1 FROM syscolumns WHERE ID = OBJECT_ID('PRC_FILIAL_DEPOSITO_AUXILIAR_EST_PROD_CPL') AND NAME = 'CD_CTR_GRP_DEPO_AUX')
BEGIN  
	ALTER TABLE dbo.PRC_FILIAL_DEPOSITO_AUXILIAR_EST_PROD_CPL ADD
		CD_CTR_GRP_DEPO_AUX INT NOT NULL
	 
	ALTER TABLE dbo.PRC_FILIAL_DEPOSITO_AUXILIAR_EST_PROD_CPL ADD CONSTRAINT
		DF_PRC_FILIAL_DEPOSITO_AUXILIAR_EST_PROD_CPL_CD_CTR_GRP_DEPO_AUX DEFAULT 0 FOR CD_CTR_GRP_DEPO_AUX
END

IF NOT EXISTS(SELECT 1 FROM syscolumns WHERE ID = OBJECT_ID('PRC_FILIAL_DEPOSITO_AUXILIAR_EST_PROD') AND NAME = 'CD_CTR_GRP_DEPO_AUX')
BEGIN  
	ALTER TABLE dbo.PRC_FILIAL_DEPOSITO_AUXILIAR_EST_PROD ADD
		CD_CTR_GRP_DEPO_AUX INT NOT NULL
	 
	ALTER TABLE dbo.PRC_FILIAL_DEPOSITO_AUXILIAR_EST_PROD ADD CONSTRAINT
		DF_PRC_FILIAL_DEPOSITO_AUXILIAR_EST_PROD_CD_CTR_GRP_DEPO_AUX DEFAULT 0 FOR CD_CTR_GRP_DEPO_AUX
END
 
 
  