--
--


--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';





--
-- Name: syslog_message; Type: TABLE; Schema: public; Owner: gazelle; Tablespace:
--

CREATE TABLE syslog_message (
    id integer NOT NULL,
    sender_ip character varying(15) NOT NULL,
    collector_ip character varying(15) NOT NULL,
    collector_port integer NOT NULL,
    transport_type integer NOT NULL,
    arrival_time timestamp with time zone NOT NULL,
    error_message text,
    rfc3164_parse_succeed boolean,
    rfc3164_error_message text,
    rfc3164_error_substring character varying(255),
    rfc3164_error_location integer,
    rfc5424_parse_succeed boolean,
    rfc5424_error_message text,
    rfc5424_error_substring character varying(255),
    rfc5424_error_location integer,
    raw_message text,
    message_content text
);


ALTER TABLE public.syslog_message OWNER TO gazelle;

--
-- Name: syslog_message_id_seq; Type: SEQUENCE; Schema: public; Owner: gazelle
--

CREATE SEQUENCE syslog_message_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.syslog_message_id_seq OWNER TO gazelle;

--
-- Name: syslog_message_pkey; Type: CONSTRAINT; Schema: public; Owner: gazelle; Tablespace: 
--

ALTER TABLE ONLY syslog_message
    ADD CONSTRAINT syslog_message_pkey PRIMARY KEY (id);

--
-- Name: syslog_message_sender_ip_idx; Type: INDEX; Schema: public; Owner: gazelle; Tablespace:
--

CREATE INDEX syslog_message_sender_ip_idx ON syslog_message USING btree (sender_ip);


--
-- Name: syslog_message_transport_type_idx; Type: INDEX; Schema: public; Owner: gazelle; Tablespace:
--

CREATE INDEX syslog_message_transport_type_idx ON syslog_message USING btree (transport_type);


--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
--

