Skip to content
Snippets Groups Projects
Commit 0f2817e9 authored by Andy Yates's avatar Andy Yates
Browse files

Only run --fixlast logic if the schema had a version

parent b80143ab
No related branches found
No related tags found
No related merge requests found
......@@ -471,10 +471,12 @@ while ( $sth->fetch() ) {
#Quick check if fix-last is active. If so we will hard-code some values
if($opt_fixlast) {
$opt_fix = 1;
$opt_oldest = ($schema_version == $latest_release) ? $latest_release : $latest_release - 1;
die "Cannot use --fixlast with a schema release too far from the latest release; oldest allowed is $opt_oldest" if $schema_version < ($opt_oldest);
printf("--fixlast is active. Will apply patches for version %d and up (if available)\n", $opt_oldest);
if(defined $schema_version) {
$opt_fix = 1;
$opt_oldest = ($schema_version == $latest_release) ? $latest_release : $latest_release - 1;
die "Cannot use --fixlast with a schema release too far from the latest release; oldest allowed is $opt_oldest" if $schema_version < ($opt_oldest);
printf("--fixlast is active. Will apply patches for version %d and up (if available)\n", $opt_oldest);
}
}
if ( $schema_version_ok &&
......
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