lib/reptile/delta_monitor.rb in reptile-0.0.4 vs lib/reptile/delta_monitor.rb in reptile-0.0.5

- old
+ new

@@ -35,10 +35,14 @@ ActiveRecord::Base.establish_connection(master_configs.merge(user)) master_counts = get_table_counts deltas= {} - master_counts.each do |table, master_count| + master_counts.each do |table, master_count| + if slave_counts[table].nil? + puts "Table '#{table}' exists on master but not on slave." + next + end delta = master_count.first.to_i - slave_counts[table].first.to_i deltas[table] = delta end print_deltas(db_name, deltas, master_configs) \ No newline at end of file