From 51a8ef93d8f5eac665869f3783d63e221faad614 Mon Sep 17 00:00:00 2001
From: Monika Komorowska <mk8@sanger.ac.uk>
Date: Mon, 25 Jul 2011 12:33:29 +0000
Subject: [PATCH] Changed new species query to use db release instead of
 is_current, in case the is_current field is not updated.

---
 misc-scripts/density_feature/submit_density_features.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc-scripts/density_feature/submit_density_features.pl b/misc-scripts/density_feature/submit_density_features.pl
index 8e41bc5e29..130a13e3d5 100644
--- a/misc-scripts/density_feature/submit_density_features.pl
+++ b/misc-scripts/density_feature/submit_density_features.pl
@@ -131,7 +131,7 @@ my @chg_variation;
 
 if ($response >= 1) {
     #get new dbs, or changed assembly  
-    @new_sp_assem =  map { $_->[0] }  @{ $prod_dbh->selectall_arrayref("select distinct concat(full_db_name,'|',db_host) from db_list dl join db d using (db_id) where is_current = 1 and db_type = 'core' and species_id not in (select distinct species_id from db where is_current <> 1 and db_type = 'core') union
+    @new_sp_assem =  map { $_->[0] }  @{ $prod_dbh->selectall_arrayref("select distinct concat(full_db_name,'|',db_host) from db_list dl join db d using (db_id) where db_release = $current_release and db_type = 'core' and species_id not in (select distinct species_id from db where db_release <> $current_release and db_type = 'core') union
 select distinct concat(full_db_name,'|',db_host) from db_list dl join db d using (db_id) where db_type = 'core' and is_current = 1 and species_id in (select distinct species_id from changelog_species cs join changelog c using (changelog_id) where release_id = $current_release and status not in ('cancelled','postponed') and assembly = 'Y')") };
     #get dbs with changed sequence
     @chg_seq = map { $_->[0] }  @{ $prod_dbh->selectall_arrayref("select distinct concat(full_db_name,'|',db_host) from db_list dl join db d using (db_id) where db_type = 'core' and is_current = 1 and species_id in (select distinct species_id from changelog_species cs join changelog c using (changelog_id) where release_id = $current_release and status not in ('cancelled','postponed') and gene_set = 'Y')") };
-- 
GitLab