All Downloads are FREE. Search and download functionalities are using the official Maven repository.

db.migration.v0.18.0.5__hpterm.sql Maven / Gradle / Ivy

There is a newer version: v0.35.0
Show newest version
drop table if exists public.hpterm;
drop table if exists public.hpterm_aud;

CREATE TABLE public.hpterm (
    curie character varying(255) NOT NULL
);

CREATE TABLE public.hpterm_aud (
    curie character varying(255) NOT NULL,
    rev integer NOT NULL
);

ALTER TABLE ONLY public.hpterm
    ADD CONSTRAINT hpterm_pkey PRIMARY KEY (curie);
ALTER TABLE ONLY public.hpterm
    ADD CONSTRAINT hpterm_curie_fk FOREIGN KEY (curie) REFERENCES public.phenotypeterm(curie);

ALTER TABLE ONLY public.hpterm_aud
    ADD CONSTRAINT hpterm_aud_pkey PRIMARY KEY (curie, rev);
ALTER TABLE ONLY public.hpterm_aud
    ADD CONSTRAINT hpterm_aud_curie_rev_fk FOREIGN KEY (curie, rev) REFERENCES public.phenotypeterm_aud(curie, rev);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy