/* ADICAO DE COLUNAS NA TABELA RC_CLI-- NUMERO E COMPLEMENTO DE ENDEREÇO DE COBRANÇA */

IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE id = object_id('RC_CLI') and name = 'COMPLE_COBRANCA')
	ALTER TABLE RC_CLI ADD 	COMPLE_COBRANCA varchar(50) NULL

	IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RC_CLI_COMPLE_COBRANCA]') AND type = 'D')
	BEGIN
		ALTER TABLE RC_CLI DROP CONSTRAINT DF_RC_CLI_COMPLE_COBRANCA
	END

	ALTER TABLE RC_CLI ADD CONSTRAINT DF_RC_CLI_COMPLE_COBRANCA DEFAULT ('') FOR COMPLE_COBRANCA
	
IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE id = object_id('RC_CLI') and name = 'NUMER_COBRANCA')
	ALTER TABLE RC_CLI ADD	NUMER_COBRANCA int NULL