DROP SEQUENCE public.seq_log_flx_mov_financ; CREATE SEQUENCE public.seq_log_flx_mov_financ INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9999999999 CACHE 1; ALTER SEQUENCE public.seq_log_flx_mov_financ OWNER TO postgres; COMMENT ON SEQUENCE public.seq_log_flx_mov_financ IS 'Sequecia para Gravar o Log do Fluxo de Movimento Financeiro'; DROP TABLE public.log_flx_mov_financ; CREATE TABLE public.log_flx_mov_financ ( log_sequencia integer NOT NULL, log_terminal_ip character varying(50) NOT NULL, log_usuario integer NOT NULL, log_formulario character varying(100) NOT NULL, log_data date NOT NULL, log_hora time without time zone NOT NULL, log_observacao character varying(200) NOT NULL, log_tipo_operacao integer NOT NULL, ant_filial_mov integer NOT NULL, ant_sequencia integer NOT NULL, ant_banco integer NOT NULL, ant_agencia character varying(10) NOT NULL, ant_conta_bc character varying(15) NOT NULL, ant_historico_padrao_ctb integer NOT NULL, ant_tipo_movto_finan integer NOT NULL, ant_data date NOT NULL, ant_vlr_movto numeric(18,6) NOT NULL, ant_centro_custo integer NOT NULL, ant_conta_contabil numeric(14,0) NOT NULL, ant_filial_nota integer NOT NULL, ant_nota_fiscal integer NOT NULL, ant_serie_nota_fiscal character varying(6) NOT NULL, ant_evento_finan integer NOT NULL, ant_banco_destino integer NOT NULL, ant_agencia_destino character varying(10) NOT NULL, ant_conta_bc_destino character varying(15) NOT NULL, ant_filial_cli integer NOT NULL, ant_cliente integer NOT NULL, ant_filial_for integer NOT NULL, ant_fornecedor integer NOT NULL, ant_vlr_juros numeric(18,6) NOT NULL, ant_vlr_desconto numeric(18,6) NOT NULL, ant_observacao character varying(300) NOT NULL, ant_filial_pedido integer NOT NULL, ant_pedido integer NOT NULL, ant_filial_duplicata integer NOT NULL, ant_duplicata_rcb integer NOT NULL, ant_parcela_duplicata_rcb integer NOT NULL, ant_caixa integer NOT NULL, ant_abertura integer NOT NULL, ant_tipo_pgto integer NOT NULL, ant_fil_dup_pagar integer NOT NULL, ant_duplicata_pagar integer NOT NULL, ant_parcela_duplicata_pagar integer NOT NULL, ant_usuario integer NOT NULL, ant_hora time without time zone NOT NULL, ant_duplicata_sequencia integer NOT NULL, ant_data_pagamento date NOT NULL, ant_data_credito date NOT NULL, atu_filial_mov integer NOT NULL, atu_sequencia integer NOT NULL, atu_banco integer NOT NULL, atu_agencia character varying(10) NOT NULL, atu_conta_bc character varying(15) NOT NULL, atu_historico_padrao_ctb integer NOT NULL, atu_tipo_movto_finan integer NOT NULL, atu_data date NOT NULL, atu_vlr_movto numeric(18,6) NOT NULL, atu_centro_custo integer NOT NULL, atu_conta_contabil numeric(14,0) NOT NULL, atu_filial_nota integer NOT NULL, atu_nota_fiscal integer NOT NULL, atu_serie_nota_fiscal character varying(6) NOT NULL, atu_evento_finan integer NOT NULL, atu_banco_destino integer NOT NULL, atu_agencia_destino character varying(10) NOT NULL, atu_conta_bc_destino character varying(15) NOT NULL, atu_filial_cli integer NOT NULL, atu_cliente integer NOT NULL, atu_filial_for integer NOT NULL, atu_fornecedor integer NOT NULL, atu_vlr_juros numeric(18,6) NOT NULL, atu_vlr_desconto numeric(18,6) NOT NULL, atu_observacao character varying(300) NOT NULL, atu_filial_pedido integer NOT NULL, atu_pedido integer NOT NULL, atu_filial_duplicata integer NOT NULL, atu_duplicata_rcb integer NOT NULL, atu_parcela_duplicata_rcb integer NOT NULL, atu_caixa integer NOT NULL, atu_abertura integer NOT NULL, atu_tipo_pgto integer NOT NULL, atu_fil_dup_pagar integer NOT NULL, atu_duplicata_pagar integer NOT NULL, atu_parcela_duplicata_pagar integer NOT NULL, atu_usuario integer NOT NULL, atu_hora time without time zone NOT NULL, atu_duplicata_sequencia integer NOT NULL, atu_data_pagamento date NOT NULL, atu_data_credito date NOT NULL, CONSTRAINT pk_log_flx_mov_financ PRIMARY KEY (log_sequencia), CONSTRAINT fk_log_flx_mov_financ FOREIGN KEY (ant_filial_mov, ant_sequencia) REFERENCES public.flx_mov_financ (filial_mov, sequencia) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE RESTRICT ) TABLESPACE pg_default; ALTER TABLE IF EXISTS public.log_flx_mov_financ OWNER to postgres; COMMENT ON TABLE public.log_flx_mov_financ IS 'Log do Fluxo de Movimento Financeiro';