CREATE TABLE IF NOT EXISTS dis_romaneio_webrota_log( filial integer NOT NULL, romaneio integer NOT NULL, sequencia integer NOT NULL, route_id integer NOT NULL, response character varying NOT NULL, CONSTRAINT pk_dis_romaneio_webrota_log PRIMARY KEY (filial, romaneio, sequencia), CONSTRAINT fk_dis_romaneio_webrota_log_romaneio FOREIGN KEY (filial, romaneio) REFERENCES dis_romaneio (filial, romaneio) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE RESTRICT );