IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'DBO.PDV_MOV_DIARIO_OPERADOR_ABERTO') AND TYPE IN (N'U'))
BEGIN

CREATE TABLE dbo.PDV_MOV_DIARIO_OPERADOR_ABERTO (
	CD_EMP int DEFAULT 0 NOT NULL,
	CD_FILIAL int DEFAULT 0 NOT NULL,
	CD_CX int DEFAULT 0 NOT NULL,
	CD_MOV bigint IDENTITY(1,1) NOT NULL,
	DT_MOV datetime DEFAULT getdate() NOT NULL,
	ST_MOV smallint DEFAULT 0 NOT NULL,
	CD_OPER int DEFAULT 0 NOT NULL,
	VL_ABERT money DEFAULT 0 NOT NULL,
	CD_MOV_PDV bigint DEFAULT 0 NULL,
	RECEIPT_URI varchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	NR_ECF_UUID varchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	CONSTRAINT PK_PDV_MOV_DIARIO_OPERADOR_ABERTO PRIMARY KEY (CD_MOV)
);

END