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

Fixes for --fixlast making sure we do not attempt to fix a schema too far in the past

parent b3ed6b6f
No related branches found
No related tags found
No related merge requests found
......@@ -471,8 +471,9 @@ 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 - 1;
printf("--fixlast is active. Will apply patches for versions %d and %d\n", $opt_oldest, $schema_version);
$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