IF  NOT EXISTS (SELECT * FROM sys.objects 
WHERE object_id = OBJECT_ID(N'[dbo].[INTEGRA_IFOOD_PROMOCOES]') AND type in (N'U'))

BEGIN

CREATE TABLE INTEGRA_IFOOD_PROMOCOES (
 CD_TABLOIDE int NOT NULL,
 CD_FILIAL int NOT NULL,
 DT_INICIO datetime NULL,
 DT_FIM datetime NULL,
 DS_DESCRICAO varchar(70) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 JSON_ENVIADO nvarchar(MAX) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 DATA_ENVIO datetime NULL,
 CD_CTR bigint IDENTITY(1,1) NOT NULL,
 DATA_CADASTRO datetime DEFAULT getdate() NULL,
 STATUS int DEFAULT 0 NOT NULL,
 JSON_RECEBIDO nvarchar(MAX) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT INTEGRA_IFOOD_PROMOCOES_PK PRIMARY KEY (CD_CTR)
);

END
