db.migration.v0.21.0.5__apoterm.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of agr_curation_api Show documentation
Show all versions of agr_curation_api Show documentation
This software is for using the curation api as a library
CREATE TABLE apoterm (
curie character varying(255) NOT NULL
);
ALTER TABLE ONLY apoterm
ADD CONSTRAINT apoterm_pkey PRIMARY KEY (curie);
ALTER TABLE ONLY apoterm
ADD CONSTRAINT apoterm_curie_fk FOREIGN KEY (curie) REFERENCES phenotypeterm(curie);
CREATE TABLE apoterm_aud (
curie character varying(255) NOT NULL,
rev integer NOT NULL
);
ALTER TABLE apoterm_aud
ADD CONSTRAINT apoterm_aud_pkey PRIMARY KEY (curie, rev);
ALTER TABLE ONLY apoterm_aud
ADD CONSTRAINT apoterm_aud_curie_rev_fk FOREIGN KEY (curie, rev) REFERENCES phenotypeterm_aud(curie, rev);