
IF not exists(select 1 from syscolumns where id = object_id('PG_CRED_HISTORICO_CPL') and name = 'NR_DP')
BEGIN
	ALTER TABLE PG_CRED_HISTORICO_CPL ADD
		NR_DP int NOT NULL CONSTRAINT DF_PG_CRED_HISTORICO_CPL_NR_DP DEFAULT ((0))
	
END

IF not exists(select 1 from syscolumns where id = object_id('PG_CRED_HISTORICO_CPL') and name = 'ANO')
BEGIN
	ALTER TABLE dbo.PG_CRED_HISTORICO_CPL ADD
		ANO int NOT NULL CONSTRAINT DF_PG_CRED_HISTORICO_CPL_ANO DEFAULT ((0))
END

IF not exists(select 1 from syscolumns where id = object_id('PG_CRED_HISTORICO_CPL') and name = 'PARC')
BEGIN
	ALTER TABLE dbo.PG_CRED_HISTORICO_CPL ADD
		PARC int NOT NULL CONSTRAINT DF_PG_CRED_HISTORICO_CPL_PARC DEFAULT ((0))
END
