Skip to content
Snippets Groups Projects
Commit d05801b0 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Also update is_current in the db table.

parent 59fc16a7
No related branches found
No related tags found
No related merge requests found
......@@ -217,8 +217,9 @@ if ( scalar( keys(%databases) ) == 0 ) {
my $statement =
'INSERT INTO db '
. '(species_id, db_type, db_release, db_assembly, db_suffix, db_host) '
. 'VALUES (?, ?, ?, ?, ?, ?)';
. '(species_id, is_current, db_type, '
. 'db_release, db_assembly, db_suffix, db_host) '
. 'VALUES (?, 1, ?, ?, ?, ?, ?)';
my $sth = $dbh->prepare($statement);
foreach my $database ( keys(%databases) ) {
......@@ -238,5 +239,9 @@ if ( scalar( keys(%databases) ) == 0 ) {
$sth->execute();
}
$dbh->do(
sprintf( 'UPDATE db SET is_current = 0 WHERE db_release != %s',
$dbh->quote( $release, SQL_INTEGER ) ) );
$dbh->disconnect();
} ## end else [ if ( scalar( keys(%databases...)))]
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment