From dd38eef0483d13b60edfdfe7604529c67f3ff812 Mon Sep 17 00:00:00 2001 From: Glenn Proctor <gp1@sanger.ac.uk> Date: Fri, 24 Jun 2005 11:01:45 +0000 Subject: [PATCH] Updated ith new linkable, priority columns. Also added cdna to list of database types and removed estgene. --- .../external_db/update_external_dbs.pl | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/misc-scripts/external_db/update_external_dbs.pl b/misc-scripts/external_db/update_external_dbs.pl index efedb49688..b0ae90b49c 100644 --- a/misc-scripts/external_db/update_external_dbs.pl +++ b/misc-scripts/external_db/update_external_dbs.pl @@ -65,10 +65,13 @@ my $row; while($row = <$fh>) { chomp($row); my @a = split(/\t/, $row); - push @rows, {'external_db_id' => $a[0], - 'db_name' => $a[1], - 'release' => $a[2], - 'status' => $a[3]}; + push @rows, {'external_db_id' => $a[0], + 'db_name' => $a[1], + 'release' => $a[2], + 'status' => $a[3], + 'dbprimary_acc_linkable' => $a[4], + 'display_label_linkable' => $a[5], + 'priority' => $a[6]}; } $fh->close(); @@ -80,16 +83,20 @@ foreach my $dbname (@dbnames) { $sth->finish(); $sth = $db->prepare('INSERT INTO external_db (external_db_id, db_name, - release, status) - VALUES (?,?,?,?)'); - + release, status, dbprimary_acc_linkable, + display_label_linkable, priority) + VALUES (?,?,?,?,?,?,?)'); + foreach my $row (@rows) { - $sth->execute($row->{'external_db_id'}, + $sth->execute($row->{'external_db_id'}, $row->{'db_name'}, $row->{'release'}, - $row->{'status'}); + $row->{'status'}, + $row->{'dbprimary_acc_linkable'}, + $row->{'display_label_linkable'}, + $row->{'priority'}); } - + $sth->finish(); } -- GitLab