--
--

SET escape_string_warning = off;




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

CREATE TABLE "domain" (
    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
);


ALTER TABLE public."domain" OWNER TO postgres;

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

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


ALTER TABLE public.domain_id_seq OWNER TO postgres;

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

ALTER SEQUENCE domain_id_seq OWNED BY "domain".id;


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

ALTER TABLE "domain" ALTER COLUMN id SET DEFAULT nextval('domain_id_seq'::regclass);


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

ALTER TABLE ONLY "domain"
    ADD CONSTRAINT domain_keyword_key UNIQUE (keyword);


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

ALTER TABLE ONLY "domain"
    ADD CONSTRAINT domain_pkey PRIMARY KEY (id);


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

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


--
--

