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

Adding a check to warn a user if the applied patches for the current version are equal

parent 9e0241c7
No related branches found
No related tags found
No related merge requests found
......@@ -421,7 +421,14 @@ while ( $sth->fetch() ) {
if($opt_verbose) {
printf("Skipping database %s (type: %s | version: %d)\n", $database, ($schema_type||'-'), ($schema_version || 0));
if( $schema_type_ok && $schema_type eq $opt_type && $schema_version_ok && $schema_version == $opt_release) {
printf("\tDB version was equal to latest release; if you need to patch then rerun with --fix and --dryrun\n");
my $release_patches = join(q{,}, sort @{$patches{$schema_type}{$schema_version}});
my $db_patches = join(q{,}, sort @{$dbpatches{$schema_version}});
if($release_patches ne $db_patches) {
printf("\t%s patches [%s] are not the same as release %i patches [%s]; if you need to patch then rerun with --fix and --dryrun\n",
$database, $db_patches, $opt_release, $release_patches);
}
}
}
next;
......
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