IF NOT EXISTS (
    SELECT 1 
    FROM sys.objects 
    WHERE object_id = OBJECT_ID('dbo.INTEGRADOR_LINX_PROMOCOES') 
      AND type = 'U'
)
BEGIN

	CREATE TABLE [dbo].[INTEGRADOR_LINX_PROMOCOES](
		[CD_TABLOIDE] [int] NOT NULL,
		[CD_FILIAL] [int] NOT NULL,
		[DT_INICIO] [datetime] NULL,
		[DT_FIM] [datetime] NULL,
		[DS_DESCRICAO] [varchar](70) NULL,
		[JSON_ENVIADO] [nvarchar](max) NULL,
		[DATA_ENVIO] [datetime] NULL,
		[CD_CTR] [bigint] IDENTITY(1,1) NOT NULL,
		[DATA_CADASTRO] [datetime] NULL DEFAULT GETDATE(),
		[STATUS] [int] NOT NULL DEFAULT 0,
		[JSON_RECEBIDO] [nvarchar](max) NULL,
		[OPERACAO] [int] NULL,
		[CANAL_VENDA] [int] NULL,
	 CONSTRAINT [INTEGRADOR_LINX_PROMOCOES_PK] PRIMARY KEY CLUSTERED 
	(
		[CD_CTR] ASC
	)
	);
   
END
GO