db.migration.v0.16.0.5__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
DELETE FROM reference_crossreference
WHERE reference_curie IN (
SELECT curie FROM informationcontententity
WHERE obsolete = true
);
DELETE FROM reference
WHERE curie IN (
SELECT curie FROM informationcontententity
WHERE obsolete = true
);
DELETE FROM slotannotation_informationcontententity
WHERE evidence_curie IN (
SELECT curie FROM informationcontententity
WHERE obsolete = true
);
DELETE FROM informationcontententity
WHERE obsolete = true;
DELETE FROM ontologyterm_crossreference;
DELETE FROM genomicentity_crossreference;
DELETE FROM crossreference c
WHERE NOT EXISTS (
SELECT null FROM reference_crossreference r
WHERE c.id = r.crossreferences_id
) AND NOT EXISTS (
SELECT null FROM dataprovider d
WHERE c.id = d.crossreference_id
);