Revision 8a6fc682
Von Sven Schöling vor fast 7 Jahren hinzugefügt
scripts/dbupgrade2_tool.pl | ||
---|---|---|
338 | 338 |
|
339 | 339 |
my @upgradescripts = map { $controls->{$_}->{applied} = 0; $controls->{$_} } @order; |
340 | 340 |
|
341 |
my $dbh = $opt_auth_db ? connect_auth()->dbconnect : $form->dbconnect_noauto(\%myconfig); |
|
342 |
$dbh->{AutoCommit} = 0; |
|
341 |
my $dbh = $opt_auth_db ? connect_auth()->dbconnect : SL::DB->client->dbh; |
|
343 | 342 |
|
344 | 343 |
$dbh->{PrintWarn} = 0; |
345 | 344 |
$dbh->{PrintError} = 0; |
... | ... | |
366 | 365 |
|
367 | 366 |
# apply upgrade |
368 | 367 |
print "Applying upgrade $control->{file}\n"; |
369 |
|
|
370 |
if ($file_type eq "sql") { |
|
371 |
$dbupgrader->process_query($dbh, "sql/Pg-upgrade2/$control->{file}", $control); |
|
372 |
} else { |
|
373 |
$dbupgrader->process_perl_script($dbh, "sql/Pg-upgrade2/$control->{file}", $control); |
|
374 |
} |
|
368 |
$dbupgrader->process_file($dbh, "sql/Pg-upgrade2/$control->{file}", $control); |
|
375 | 369 |
} |
376 | 370 |
|
377 | 371 |
$dbh->disconnect unless $opt_auth_db; |
... | ... | |
407 | 401 |
sub dump_applied { |
408 | 402 |
my @results; |
409 | 403 |
|
410 |
my $dbh = $opt_auth_db ? connect_auth()->dbconnect : $form->dbconnect_noauto(\%myconfig);
|
|
404 |
my $dbh = $opt_auth_db ? connect_auth()->dbconnect : SL::DB->client->dbh;
|
|
411 | 405 |
$dbh->{AutoCommit} = 0; |
412 | 406 |
|
413 | 407 |
$dbh->{PrintWarn} = 0; |
... | ... | |
435 | 429 |
sub dump_unapplied { |
436 | 430 |
my @results; |
437 | 431 |
|
438 |
my $dbh = $opt_auth_db ? connect_auth()->dbconnect : $form->dbconnect_noauto(\%myconfig);
|
|
432 |
my $dbh = $opt_auth_db ? connect_auth()->dbconnect : SL::DB->client->dbh;
|
|
439 | 433 |
|
440 | 434 |
$dbh->{PrintWarn} = 0; |
441 | 435 |
$dbh->{PrintError} = 0; |
Auch abrufbar als: Unified diff
scripts/dbupgrade2_tool.pl: Datenbankverbindungen mit SL::DB->client