--
--

SET escape_string_warning = off;




--
-- Name: integration_profile; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE integration_profile (
    id integer NOT NULL,
    keyword character varying(32) NOT NULL,
    name character varying(64) NOT NULL,
    description text,
    last_changed timestamp with time zone,
    last_modifier_id integer,
    domain_id integer
);


ALTER TABLE public.integration_profile OWNER TO postgres;

--
-- Name: integration_profile_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.integration_profile_id_seq OWNER TO postgres;

--
-- Name: integration_profile_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE integration_profile_id_seq OWNED BY integration_profile.id;


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

ALTER TABLE integration_profile ALTER COLUMN id SET DEFAULT nextval('integration_profile_id_seq'::regclass);


--
-- Name: integration_profile_keyword_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY integration_profile
    ADD CONSTRAINT integration_profile_keyword_key UNIQUE (keyword);


--
-- Name: integration_profile_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY integration_profile
    ADD CONSTRAINT integration_profile_pkey PRIMARY KEY (id);


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

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


--
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY integration_profile
    ADD CONSTRAINT "$1" FOREIGN KEY (domain_id) REFERENCES domain(id);


--
--

