1- import re
21import sys
32
43
@@ -61,10 +60,6 @@ def _print(color, msg, output):
6160
6261
6362def compare_states (before , after , logging , output = sys .stdout , limit = 10000 ):
64- # Did we detect _any_ changes?
65- changed = False
66-
67- # Any new tables?
6863 tables_before = set (before ['tables' ])
6964 tables_after = set (after ['tables' ])
7065 dropped_tables = tables_before - tables_after
@@ -73,12 +68,10 @@ def compare_states(before, after, logging, output=sys.stdout, limit=10000):
7368 output .write ('Dropped %d table(s):' % (len (dropped_tables )))
7469 for dropped_table in dropped_tables :
7570 _print (bcolors .FAIL , dropped_table , output )
76- changed = True
7771 if len (new_tables ) > 0 :
7872 output .write ('Added %d table(s):' % (len (new_tables )))
7973 for added_table in new_tables :
8074 _print (bcolors .OKGREEN , added_table , output )
81- changed = True
8275
8376 # We can only do diff magic on tables that were in both databases
8477 tables = tables_after .intersection (tables_before )
@@ -93,7 +86,6 @@ def compare_states(before, after, logging, output=sys.stdout, limit=10000):
9386 delta_count = count_after - count_before
9487 if delta_count != 0 :
9588 logging .info ('%s %d' % (table , delta_count ))
96- changed = True
9789 removed_objects = objects_before - objects_after
9890 added_objects = objects_after - objects_before
9991 if len (removed_objects ) > 0 :
0 commit comments