CREATE TABLE public.nfs_nota_x_romaneio_x_pedido ( sequencia integer NOT NULL, filial_nota integer NOT NULL, nota_fiscal integer NOT NULL, serie character varying(6) COLLATE pg_catalog."default" NOT NULL, filial_romaneio integer NOT NULL, romaneio integer NOT NULL, filial_orcamento integer NOT NULL, orcamento integer NOT NULL, CONSTRAINT pk_nfs_nota_x_romaneio_x_pedido PRIMARY KEY (sequencia), CONSTRAINT fk_nfs_nota_x_romaneio_x_pedido FOREIGN KEY (filial_nota, nota_fiscal, serie) REFERENCES public.nfs_nota_fiscal (filial_nota, nota, serie) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE public.nfs_nota_x_romaneio_x_pedido OWNER to postgres;