CREATE SEQUENCE requests_id_seq
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;

CREATE TABLE requests (
    id              INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('requests_id_seq'::regclass),
    wfsidintern     CHARACTER VARYING(100),
    wfsidextern     CHARACTER VARYING(100),
    username        CHARACTER VARYING(20),
    starttime       TIMESTAMP WITH TIME ZONE,
    endtime         TIMESTAMP WITH TIME ZONE,
    requestformat   INTEGER,
    rawrequest      BYTEA,
    numfeatures     INTEGER
);

ALTER TABLE public.requests OWNER TO osaas;
