--
-- Name: mirth_input; Type: TABLE; Schema: public; Owner: epoiseau; Tablespace: 
--

CREATE TABLE mirth_input (
    id integer NOT NULL,
    sending_app text,
    receiving_app text,
    msg_code text,
    trigger_event text,
    msg_struct text,
    message text,
    event_timestamp text,
    version_id text,
    message_time bigint,
    last_changed timestamp with time zone,
    sending_facility text,
    receiving_facility text,
    target_hostname text,
    target_port integer,
    character_set text,
    message_profile_identifier text,
    receiver_socket text
);

-- Name: mirth_input_id_seq; Type: SEQUENCE; Schema: public; Owner: epoiseau
--

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

--
-- Name: mirth_input_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: epoiseau
--

ALTER SEQUENCE mirth_input_id_seq OWNED BY mirth_input.id;


--
-- Name: id; Type: DEFAULT; Schema: public; Owner: epoiseau
--

ALTER TABLE mirth_input ALTER COLUMN id SET DEFAULT nextval('mirth_input_id_seq');


--
-- Name: mirth_input_pkey; Type: CONSTRAINT; Schema: public; Owner: epoiseau; Tablespace: 
--

ALTER TABLE ONLY mirth_input
    ADD CONSTRAINT mirth_input_pkey PRIMARY KEY (id);


--
-- Name: timestamp_update; Type: TRIGGER; Schema: public; Owner: epoiseau
--

CREATE TRIGGER timestamp_update
    BEFORE INSERT OR UPDATE ON mirth_input
    FOR EACH ROW
    EXECUTE PROCEDURE timestamp_update();


--
--
