2 -- PostgreSQL database dump
5 -- Dumped from database version 11.4 (Debian 11.4-1.pgdg90+1)
6 -- Dumped by pg_dump version 11.4 (Debian 11.4-1.pgdg90+1)
8 SET statement_timeout = 0;
10 SET idle_in_transaction_session_timeout = 0;
11 SET client_encoding = 'UTF8';
12 SET standard_conforming_strings = on;
13 SELECT pg_catalog.set_config('search_path', '', false);
14 SET check_function_bodies = false;
15 SET xmloption = content;
16 SET client_min_messages = warning;
17 SET row_security = off;
20 -- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner:
23 CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
27 -- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner:
30 COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions';
33 SET default_tablespace = '';
35 SET default_with_oids = false;
38 -- Name: compound; Type: TABLE; Schema: public; Owner: postgres
41 CREATE TABLE public.compound (
42 compound_id integer NOT NULL,
43 formula text NOT NULL,
45 smid_id character varying(100) NOT NULL,
47 curation_status character varying(100),
50 last_curated_time timestamp without time zone,
51 create_date timestamp without time zone,
52 last_modified_date timestamp without time zone,
53 iupac_name text NOT NULL,
59 ALTER TABLE public.compound OWNER TO postgres;
62 -- Name: compound_compound_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
65 CREATE SEQUENCE public.compound_compound_id_seq
74 ALTER TABLE public.compound_compound_id_seq OWNER TO postgres;
77 -- Name: compound_compound_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
80 ALTER SEQUENCE public.compound_compound_id_seq OWNED BY public.compound.compound_id;
84 -- Name: compound_dbxref; Type: TABLE; Schema: public; Owner: postgres
87 CREATE TABLE public.compound_dbxref (
88 compound_dbxref_id integer NOT NULL,
92 curation_status character varying(100),
94 last_curatated_time timestamp without time zone
98 ALTER TABLE public.compound_dbxref OWNER TO postgres;
101 -- Name: compound_dbxref_compound_dbxref_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
104 CREATE SEQUENCE public.compound_dbxref_compound_dbxref_id_seq
113 ALTER TABLE public.compound_dbxref_compound_dbxref_id_seq OWNER TO postgres;
116 -- Name: compound_dbxref_compound_dbxref_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
119 ALTER SEQUENCE public.compound_dbxref_compound_dbxref_id_seq OWNED BY public.compound_dbxref.compound_dbxref_id;
123 -- Name: compound_image; Type: TABLE; Schema: public; Owner: postgres
126 CREATE TABLE public.compound_image (
127 compound_image_id integer NOT NULL,
131 last_curated_time timestamp without time zone,
132 curation_status character varying(100)
136 ALTER TABLE public.compound_image OWNER TO postgres;
139 -- Name: compound_image_compound_image_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
142 CREATE SEQUENCE public.compound_image_compound_image_id_seq
151 ALTER TABLE public.compound_image_compound_image_id_seq OWNER TO postgres;
154 -- Name: compound_image_compound_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
157 ALTER SEQUENCE public.compound_image_compound_image_id_seq OWNED BY public.compound_image.compound_image_id;
161 -- Name: db; Type: TABLE; Schema: public; Owner: postgres
164 CREATE TABLE public.db (
165 db_id integer NOT NULL,
166 name character varying(255),
167 description character varying(255),
168 urlprefix character varying(255),
169 url character varying(255)
173 ALTER TABLE public.db OWNER TO postgres;
176 -- Name: db_db_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
179 CREATE SEQUENCE public.db_db_id_seq
188 ALTER TABLE public.db_db_id_seq OWNER TO postgres;
191 -- Name: db_db_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
194 ALTER SEQUENCE public.db_db_id_seq OWNED BY public.db.db_id;
198 -- Name: dbuser; Type: TABLE; Schema: public; Owner: postgres
201 CREATE TABLE public.dbuser (
202 dbuser_id integer NOT NULL,
203 username character varying(100),
205 first_name character varying(100),
206 last_name character varying(100),
207 organization character varying(100),
209 phone_number character varying(100),
210 email character varying(100),
211 registration_email character varying(100),
213 disabled character varying(100),
214 last_access_time timestamp without time zone,
215 user_type character varying(100),
216 creation_date timestamp without time zone,
217 last_modified_date timestamp without time zone,
218 user_prefs character varying(255)
222 ALTER TABLE public.dbuser OWNER TO postgres;
225 -- Name: dbuser_dbuser_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
228 CREATE SEQUENCE public.dbuser_dbuser_id_seq
237 ALTER TABLE public.dbuser_dbuser_id_seq OWNER TO postgres;
240 -- Name: dbuser_dbuser_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
243 ALTER SEQUENCE public.dbuser_dbuser_id_seq OWNED BY public.dbuser.dbuser_id;
247 -- Name: dbxref; Type: TABLE; Schema: public; Owner: postgres
250 CREATE TABLE public.dbxref (
251 dbxref_id integer NOT NULL,
253 accession character varying(255),
254 version character varying(255),
260 ALTER TABLE public.dbxref OWNER TO postgres;
263 -- Name: dbxref_dbxref_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
266 CREATE SEQUENCE public.dbxref_dbxref_id_seq
275 ALTER TABLE public.dbxref_dbxref_id_seq OWNER TO postgres;
278 -- Name: dbxref_dbxref_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
281 ALTER SEQUENCE public.dbxref_dbxref_id_seq OWNED BY public.dbxref.dbxref_id;
285 -- Name: experiment; Type: TABLE; Schema: public; Owner: postgres
288 CREATE TABLE public.experiment (
289 experiment_id integer NOT NULL,
290 name character varying(100),
293 experiment_type character varying(100),
294 run_date timestamp without time zone,
295 create_date timestamp without time zone,
297 operator character varying(100),
299 compound_id bigint NOT NULL,
300 curation_status character varying(100),
302 last_curatated_time timestamp without time zone
306 ALTER TABLE public.experiment OWNER TO postgres;
309 -- Name: experiment_experiment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
312 CREATE SEQUENCE public.experiment_experiment_id_seq
321 ALTER TABLE public.experiment_experiment_id_seq OWNER TO postgres;
324 -- Name: experiment_experiment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
327 ALTER SEQUENCE public.experiment_experiment_id_seq OWNED BY public.experiment.experiment_id;
331 -- Name: image; Type: TABLE; Schema: public; Owner: postgres
334 CREATE TABLE public.image (
335 image_id integer NOT NULL,
336 image_location character varying(200),
337 name character varying(100),
339 type character varying(20),
344 ALTER TABLE public.image OWNER TO postgres;
347 -- Name: image_image_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
350 CREATE SEQUENCE public.image_image_id_seq
359 ALTER TABLE public.image_image_id_seq OWNER TO postgres;
362 -- Name: image_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
365 ALTER SEQUENCE public.image_image_id_seq OWNED BY public.image.image_id;
369 -- Name: result; Type: TABLE; Schema: public; Owner: postgres
372 CREATE TABLE public.result (
373 result_id integer NOT NULL,
374 name character varying(100),
379 create_date timestamp without time zone,
380 modified_date timestamp without time zone,
381 method_type character varying(100) NOT NULL
385 ALTER TABLE public.result OWNER TO postgres;
388 -- Name: result_result_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
391 CREATE SEQUENCE public.result_result_id_seq
400 ALTER TABLE public.result_result_id_seq OWNER TO postgres;
403 -- Name: result_result_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
406 ALTER SEQUENCE public.result_result_id_seq OWNED BY public.result.result_id;
410 -- Name: compound compound_id; Type: DEFAULT; Schema: public; Owner: postgres
413 ALTER TABLE ONLY public.compound ALTER COLUMN compound_id SET DEFAULT nextval('public.compound_compound_id_seq'::regclass);
417 -- Name: compound_dbxref compound_dbxref_id; Type: DEFAULT; Schema: public; Owner: postgres
420 ALTER TABLE ONLY public.compound_dbxref ALTER COLUMN compound_dbxref_id SET DEFAULT nextval('public.compound_dbxref_compound_dbxref_id_seq'::regclass);
424 -- Name: compound_image compound_image_id; Type: DEFAULT; Schema: public; Owner: postgres
427 ALTER TABLE ONLY public.compound_image ALTER COLUMN compound_image_id SET DEFAULT nextval('public.compound_image_compound_image_id_seq'::regclass);
431 -- Name: db db_id; Type: DEFAULT; Schema: public; Owner: postgres
434 ALTER TABLE ONLY public.db ALTER COLUMN db_id SET DEFAULT nextval('public.db_db_id_seq'::regclass);
438 -- Name: dbuser dbuser_id; Type: DEFAULT; Schema: public; Owner: postgres
441 ALTER TABLE ONLY public.dbuser ALTER COLUMN dbuser_id SET DEFAULT nextval('public.dbuser_dbuser_id_seq'::regclass);
445 -- Name: dbxref dbxref_id; Type: DEFAULT; Schema: public; Owner: postgres
448 ALTER TABLE ONLY public.dbxref ALTER COLUMN dbxref_id SET DEFAULT nextval('public.dbxref_dbxref_id_seq'::regclass);
452 -- Name: experiment experiment_id; Type: DEFAULT; Schema: public; Owner: postgres
455 ALTER TABLE ONLY public.experiment ALTER COLUMN experiment_id SET DEFAULT nextval('public.experiment_experiment_id_seq'::regclass);
459 -- Name: image image_id; Type: DEFAULT; Schema: public; Owner: postgres
462 ALTER TABLE ONLY public.image ALTER COLUMN image_id SET DEFAULT nextval('public.image_image_id_seq'::regclass);
466 -- Name: result result_id; Type: DEFAULT; Schema: public; Owner: postgres
469 ALTER TABLE ONLY public.result ALTER COLUMN result_id SET DEFAULT nextval('public.result_result_id_seq'::regclass);
473 -- Name: compound_dbxref compound_dbxref_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
476 ALTER TABLE ONLY public.compound_dbxref
477 ADD CONSTRAINT compound_dbxref_pkey PRIMARY KEY (compound_dbxref_id);
481 -- Name: compound compound_formula_key; Type: CONSTRAINT; Schema: public; Owner: postgres
484 --ALTER TABLE ONLY public.compound
485 --- ADD CONSTRAINT compound_formula_key UNIQUE (formula);
489 -- Name: compound_image compound_image_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
492 ALTER TABLE ONLY public.compound_image
493 ADD CONSTRAINT compound_image_pkey PRIMARY KEY (compound_image_id);
497 -- Name: compound compound_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
500 ALTER TABLE ONLY public.compound
501 ADD CONSTRAINT compound_pkey PRIMARY KEY (compound_id);
505 -- Name: compound compound_smid_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
508 ALTER TABLE ONLY public.compound
509 ADD CONSTRAINT compound_smid_id_key UNIQUE (smid_id);
513 -- Name: compound compound_smiles_key; Type: CONSTRAINT; Schema: public; Owner: postgres
516 --- ALTER TABLE ONLY public.compound
517 --- ADD CONSTRAINT compound_smiles_key UNIQUE (smiles);
521 -- Name: db db_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
524 ALTER TABLE ONLY public.db
525 ADD CONSTRAINT db_pkey PRIMARY KEY (db_id);
529 -- Name: dbuser dbuser_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
532 ALTER TABLE ONLY public.dbuser
533 ADD CONSTRAINT dbuser_pkey PRIMARY KEY (dbuser_id);
537 -- Name: dbxref dbxref_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
540 ALTER TABLE ONLY public.dbxref
541 ADD CONSTRAINT dbxref_pkey PRIMARY KEY (dbxref_id);
545 -- Name: experiment experiment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
548 ALTER TABLE ONLY public.experiment
549 ADD CONSTRAINT experiment_pkey PRIMARY KEY (experiment_id);
553 -- Name: image image_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
556 ALTER TABLE ONLY public.image
557 ADD CONSTRAINT image_pkey PRIMARY KEY (image_id);
561 -- Name: result result_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
564 ALTER TABLE ONLY public.result
565 ADD CONSTRAINT result_pkey PRIMARY KEY (result_id);
569 -- Name: compound compound_curator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
572 ALTER TABLE ONLY public.compound
573 ADD CONSTRAINT compound_curator_id_fkey FOREIGN KEY (curator_id) REFERENCES public.dbuser(dbuser_id);
577 -- Name: compound compound_dbuser_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
580 ALTER TABLE ONLY public.compound
581 ADD CONSTRAINT compound_dbuser_id_fkey FOREIGN KEY (dbuser_id) REFERENCES public.dbuser(dbuser_id);
585 -- Name: compound_dbxref compound_dbxref_compound_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
588 ALTER TABLE ONLY public.compound_dbxref
589 ADD CONSTRAINT compound_dbxref_compound_id_fkey FOREIGN KEY (compound_id) REFERENCES public.compound(compound_id);
593 -- Name: compound_dbxref compound_dbxref_curator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
596 ALTER TABLE ONLY public.compound_dbxref
597 ADD CONSTRAINT compound_dbxref_curator_id_fkey FOREIGN KEY (curator_id) REFERENCES public.dbuser(dbuser_id);
601 -- Name: compound_dbxref compound_dbxref_dbuser_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
604 ALTER TABLE ONLY public.compound_dbxref
605 ADD CONSTRAINT compound_dbxref_dbuser_id_fkey FOREIGN KEY (dbuser_id) REFERENCES public.dbuser(dbuser_id);
609 -- Name: compound_dbxref compound_dbxref_dbxref_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
612 ALTER TABLE ONLY public.compound_dbxref
613 ADD CONSTRAINT compound_dbxref_dbxref_id_fkey FOREIGN KEY (dbxref_id) REFERENCES public.dbxref(dbxref_id);
617 -- Name: compound_image compound_image_compound_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
620 ALTER TABLE ONLY public.compound_image
621 ADD CONSTRAINT compound_image_compound_id_fkey FOREIGN KEY (compound_id) REFERENCES public.compound(compound_id);
625 -- Name: compound_image compound_image_curator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
628 ALTER TABLE ONLY public.compound_image
629 ADD CONSTRAINT compound_image_curator_id_fkey FOREIGN KEY (curator_id) REFERENCES public.dbuser(dbuser_id);
633 -- Name: compound_image compound_image_image_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
636 ALTER TABLE ONLY public.compound_image
637 ADD CONSTRAINT compound_image_image_id_fkey FOREIGN KEY (image_id) REFERENCES public.image(image_id);
641 -- Name: dbxref dbxref_db_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
644 ALTER TABLE ONLY public.dbxref
645 ADD CONSTRAINT dbxref_db_id_fkey FOREIGN KEY (db_id) REFERENCES public.db(db_id);
649 -- Name: dbxref dbxref_dbuser_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
652 ALTER TABLE ONLY public.dbxref
653 ADD CONSTRAINT dbxref_dbuser_id_fkey FOREIGN KEY (dbuser_id) REFERENCES public.dbuser(dbuser_id);
657 -- Name: experiment experiment_compound_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
660 ALTER TABLE ONLY public.experiment
661 ADD CONSTRAINT experiment_compound_id_fkey FOREIGN KEY (compound_id) REFERENCES public.compound(compound_id);
665 -- Name: experiment experiment_curator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
668 ALTER TABLE ONLY public.experiment
669 ADD CONSTRAINT experiment_curator_id_fkey FOREIGN KEY (curator_id) REFERENCES public.dbuser(dbuser_id);
673 -- Name: experiment experiment_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
676 ALTER TABLE ONLY public.experiment
677 ADD CONSTRAINT experiment_user_id_fkey FOREIGN KEY (dbuser_id) REFERENCES public.dbuser(dbuser_id);
681 -- Name: image image_dbuser_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
684 ALTER TABLE ONLY public.image
685 ADD CONSTRAINT image_dbuser_id_fkey FOREIGN KEY (dbuser_id) REFERENCES public.dbuser(dbuser_id);
689 -- Name: result result_dbuser_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
692 ALTER TABLE ONLY public.result
693 ADD CONSTRAINT result_dbuser_id_fkey FOREIGN KEY (dbuser_id) REFERENCES public.dbuser(dbuser_id);
697 -- PostgreSQL database dump complete