fix for ND2_DB_ROLLBACK on netdisco-db-deploy where it cannot work on initial schema setup
This commit is contained in:
@@ -107,10 +107,6 @@ if ($pg_ver and $pg_ver < 90600) {
|
|||||||
die "\n";
|
die "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# roll everything back if we're testing
|
|
||||||
my $txn_guard = $ENV{ND2_DB_ROLLBACK}
|
|
||||||
? schema('netdisco')->storage->txn_scope_guard : undef;
|
|
||||||
|
|
||||||
if (scalar @ARGV and $ARGV[0] and $ARGV[0] eq '--redeploy-all') {
|
if (scalar @ARGV and $ARGV[0] and $ARGV[0] eq '--redeploy-all') {
|
||||||
$schema->storage->dbh_do(
|
$schema->storage->dbh_do(
|
||||||
sub {
|
sub {
|
||||||
@@ -139,6 +135,10 @@ try {
|
|||||||
$schema->storage->disconnect;
|
$schema->storage->disconnect;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# roll everything back if we're testing
|
||||||
|
my $txn_guard = $ENV{ND2_DB_ROLLBACK}
|
||||||
|
? schema('netdisco')->storage->txn_scope_guard : undef;
|
||||||
|
|
||||||
# upgrade from whatever dbix_class_schema_versions says, to $VERSION
|
# upgrade from whatever dbix_class_schema_versions says, to $VERSION
|
||||||
# except that get_db_version will be 0 at first deploy
|
# except that get_db_version will be 0 at first deploy
|
||||||
my $db_version = ($schema->get_db_version || 1);
|
my $db_version = ($schema->get_db_version || 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user