Skip to content
Snippets Groups Projects
Commit 72642ba9 authored by Michael Wiencek's avatar Michael Wiencek
Browse files

Revert script/database_exists to fallback behavior

Prior to e61190f6, the database_exists script
did not require e.g. `MAINTENANCE` to be defined if `READWRITE` was (because
`get` with `MAINTENANCE` falls back to `READWRITE`). There was no real reason
to change this script to use the new `exists` method over `get`, and in fact
some scripts in musicbrainz-docker rely on the old behavior, so I'm reverting
the change.
parent 33350c2e
No related branches found
Tags v-2024-08-12.0
No related merge requests found
......@@ -14,10 +14,10 @@ if ($ARGV[0])
{
my $dbname = uc($ARGV[0]);
my $db = Databases->get($dbname);
die "There is no configuration in DBDefs for database $dbname"
unless Databases->exists($dbname);
unless defined $db;
my $db = Databases->get($dbname);
my $dbh = Databases->get_connection($dbname);
$dbh->sql->quiet(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment