IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'EQUALSCORE_IMPORTACAO' AND COLUMN_NAME = 'CD_CTR')
BEGIN 
    ALTER TABLE EQUALSCORE_IMPORTACAO ADD CD_CTR BIGINT IDENTITY(1,1) NOT NULL
END


IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[EQUALSCORE_IMPORTACAO]') AND name = N'PK_EQUALSCORE_IMPORTACAO')
		ALTER TABLE dbo.EQUALSCORE_IMPORTACAO ADD CONSTRAINT
			PK_EQUALSCORE_IMPORTACAO PRIMARY KEY CLUSTERED 
			(
			[CD_CTR] ASC
			) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO



