Skip to content
Snippets Groups Projects
Commit a7cbc9e8 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Generate code to remove master table entries marked with is_current = 0.

parent befced1d
No related branches found
No related tags found
No related merge requests found
......@@ -370,6 +370,18 @@ foreach my $server (@servers) {
print("\n");
} ## end if ($is_missing)
} elsif ($master_row->{'is_current'} == 0) {
display_banner( '=',
sprintf( '%s.%s', $dbname, $table ) );
print("==> Entry has been deprecated:\n");
print( Dumper($row) );
push( @{ $sql{$dbname} },
sprintf( "-- Entry with %s_id = %d is deprecated\n",
$table, $pk ),
sprintf( "DELETE FROM %s WHERE %s_id = %d;\n\n",
$table, $table, $pk ) );
} else {
my %diff_fields;
......
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