CREATE TABLE public.vnd_aux_orcamento_item_log_liberacao ( filial_orc integer NOT NULL, prox_aux_venda integer NOT NULL, sequencia integer NOT NULL, filial_pro integer NOT NULL, produto integer NOT NULL, quantidade numeric(18,6) NOT NULL, saldo_estoque numeric(18,6) NOT NULL, usuario integer NOT NULL, vendedor integer NOT NULL, terminal_ip character varying(50) NOT NULL, data date NOT NULL, hora time without time zone NOT NULL, CONSTRAINT pk_vnd_aux_orcamento_item_log_liberacao PRIMARY KEY (filial_orc, prox_aux_venda, sequencia) ) TABLESPACE pg_default; ALTER TABLE IF EXISTS public.vnd_aux_orcamento_item_log_liberacao OWNER to postgres; CREATE TABLE public.vnd_orcamento_item_log_liberacao ( filial_orc integer NOT NULL, orcamento integer NOT NULL, sequencia integer NOT NULL, filial_pro integer NOT NULL, produto integer NOT NULL, quantidade numeric(18,6) NOT NULL, saldo_estoque numeric(18,6) NOT NULL, usuario integer NOT NULL, vendedor integer NOT NULL, terminal_ip character varying(50) NOT NULL, data date NOT NULL, hora time without time zone NOT NULL, CONSTRAINT pk_vnd_orcamento_item_log_liberacao PRIMARY KEY (filial_orc, orcamento, sequencia), CONSTRAINT fk_vnd_orcamento_item_log_liberacao FOREIGN KEY (filial_orc, orcamento, sequencia) REFERENCES public.vnd_orcamento_item (filial_orc, orcamento, sequencia) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE RESTRICT ) TABLESPACE pg_default; ALTER TABLE IF EXISTS public.vnd_orcamento_item_log_liberacao OWNER to postgres;