#334 DB schema is not upgraded past v40

This commit is contained in:
Oliver Gorwits
2017-07-31 20:31:52 +01:00
parent 8f388bc771
commit d7f6dccaf6
2 changed files with 7 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
[BUG FIXES]
* #334 DB schema is not upgraded past v40
* #335 No such device when clicking on device in netmap
2.036008 - 2017-07-14

View File

@@ -126,12 +126,17 @@ my $target_version = $schema->schema_version;
# one step at a time, in case user has applied local changes already
for (my $i = $db_version; $i < $target_version; $i++) {
my $next = $i + 1;
try {
$schema->upgrade_single_step($i, $i + 1);
$schema->upgrade_single_step($i, $next);
}
catch {
warn "Error: $_"
if $_ !~ m/(does not exist|already exists)/;
# set row in dbix_class_schema_versions table
$schema->_set_db_version({version => $next})
if $schema->get_db_version < $next;
};
}