CREATE TABLE _currentip_nav
(
  lastsign_date date,
  lastsign_time time without time zone,
  local_ip character varying(45) NOT NULL,
  connect_date date,
  connect_time time without time zone,
  CONSTRAINT _currentip_nav_pkey1 PRIMARY KEY (local_ip)
)
WITHOUT OIDS;

CREATE TABLE nav_invoices
(
  log_id serial NOT NULL,
  fej_kod integer NOT NULL,
  transaction_id character varying(30) NOT NULL,
  send_timestamp timestamp without time zone NOT NULL,
  invoice_status character varying(15) NOT NULL,
  query_timestamp timestamp without time zone,
  inv_request bytea,
  inv_response bytea,
  inv_stat_response bytea,
  CONSTRAINT nav_invoices_pkey PRIMARY KEY (log_id),
  CONSTRAINT nav_invoices_fk1 FOREIGN KEY (fej_kod)
      REFERENCES raktar_mozgas_fej (kod) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT nav_invoices_u1 UNIQUE (transaction_id)
)
WITHOUT OIDS;

-- Index: nav_invoices_i1

-- DROP INDEX nav_invoices_i1;

CREATE INDEX nav_invoices_i1
  ON nav_invoices
  USING btree
  (invoice_status COLLATE pg_catalog."default");