db.migration.v0.14.0.3__agr_curation_api.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
ALTER TABLE affectedgenomicmodel
ADD COLUMN subtype_id bigint;
ALTER TABLE affectedgenomicmodel
ADD CONSTRAINT affectedgenomicmodel_subtype_id_fk
FOREIGN KEY (subtype_id) REFERENCES vocabularyterm (id);
ALTER TABLE affectedgenomicmodel_aud
ADD COLUMN subtype_id bigint;
INSERT INTO vocabulary (id, name)
VALUES
(nextval('hibernate_sequence'), 'Affected genomic model subtypes');
INSERT INTO vocabularyterm (id, name, vocabulary_id)
SELECT nextval('hibernate_sequence'), 'fish', id FROM vocabulary WHERE name = 'Affected genomic model subtypes';
INSERT INTO vocabularyterm (id, name, vocabulary_id)
SELECT nextval('hibernate_sequence'), 'genotype', id FROM vocabulary WHERE name = 'Affected genomic model subtypes';
INSERT INTO vocabularyterm (id, name, vocabulary_id)
SELECT nextval('hibernate_sequence'), 'strain', id FROM vocabulary WHERE name = 'Affected genomic model subtypes';