diff --git a/src/main/resources/db/migration/v0.38.0.17__cleanup_expression_atlas_dataproviders.sql b/src/main/resources/db/migration/v0.38.0.17__cleanup_expression_atlas_dataproviders.sql index e372cc9a7..76b9e9f3e 100644 --- a/src/main/resources/db/migration/v0.38.0.17__cleanup_expression_atlas_dataproviders.sql +++ b/src/main/resources/db/migration/v0.38.0.17__cleanup_expression_atlas_dataproviders.sql @@ -1,16 +1,16 @@ DELETE FROM dataprovider WHERE crossreference_id IN ( - SELECT id FROM crossreference WHERE resourcedescriptorpage_id = ( + SELECT id FROM crossreference WHERE resourcedescriptorpage_id IN ( SELECT id FROM resourcedescriptorpage WHERE name = 'expression_atlas' ) ); DELETE FROM genomicentity_crossreference WHERE crossreferences_id IN ( - SELECT id FROM crossreference WHERE resourcedescriptorpage_id = ( + SELECT id FROM crossreference WHERE resourcedescriptorpage_id IN ( SELECT id FROM resourcedescriptorpage WHERE name = 'expression_atlas' ) ); -DELETE FROM crossreference WHERE resourcedescriptorpage_id = ( +DELETE FROM crossreference WHERE resourcedescriptorpage_id IN ( SELECT id FROM resourcedescriptorpage WHERE name = 'expression_atlas' );