db.migration.v0.9.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
DELETE FROM diseaseannotation_conditionrelation
WHERE diseaseannotation_id IN (
SELECT id FROM diseaseannotation
WHERE id NOT IN (SELECT id from genediseaseannotation)
AND id NOT IN (SELECT id FROM allelediseaseannotation)
AND id NOT IN (SELECT id FROM agmdiseaseannotation));
DELETE FROM diseaseannotation_ecoterm
WHERE diseaseannotation_id IN (
SELECT id FROM diseaseannotation
WHERE id NOT IN (SELECT id from genediseaseannotation)
AND id NOT IN (SELECT id FROM allelediseaseannotation)
AND id NOT IN (SELECT id FROM agmdiseaseannotation));
DELETE FROM diseaseannotation_gene
WHERE diseaseannotation_id IN (
SELECT id FROM diseaseannotation
WHERE id NOT IN (SELECT id from genediseaseannotation)
AND id NOT IN (SELECT id FROM allelediseaseannotation)
AND id NOT IN (SELECT id FROM agmdiseaseannotation));
DELETE FROM diseaseannotation_note
WHERE diseaseannotation_id IN (
SELECT id FROM diseaseannotation
WHERE id NOT IN (SELECT id from genediseaseannotation)
AND id NOT IN (SELECT id FROM allelediseaseannotation)
AND id NOT IN (SELECT id FROM agmdiseaseannotation));
DELETE FROM diseaseannotation_vocabularyterm
WHERE diseaseannotation_id IN (
SELECT id FROM diseaseannotation
WHERE id NOT IN (SELECT id from genediseaseannotation)
AND id NOT IN (SELECT id FROM allelediseaseannotation)
AND id NOT IN (SELECT id FROM agmdiseaseannotation));
DELETE FROM diseaseannotation
WHERE id NOT IN (SELECT id from genediseaseannotation)
AND id NOT IN (SELECT id FROM allelediseaseannotation)
AND id NOT IN (SELECT id FROM agmdiseaseannotation);
DELETE FROM association
WHERE id NOT IN (SELECT id from genediseaseannotation)
AND id NOT IN (SELECT id FROM allelediseaseannotation)
AND id NOT IN (SELECT id FROM agmdiseaseannotation);