File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
lib/active_record/connection_adapters/cockroachdb Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ def check_all_foreign_keys_valid!
3535
3636 def disable_referential_integrity
3737 foreign_keys = all_foreign_keys
38+ dropped_fks = foreign_keys . size
3839
3940 statements = foreign_keys . map do |foreign_key |
4041 # We do not use the `#remove_foreign_key` method here because it
@@ -77,6 +78,8 @@ def disable_referential_integrity
7778 schema_creation . accept ( at )
7879 end
7980 execute_batch ( statements . compact , "Disable referential integrity -> add foreign keys" )
81+ new_fks = statements . compact . size
82+ STDOUT . puts "FK DIFF: #{ new_fks - dropped_fks } "
8083 ensure
8184 ActiveRecord ::Base . table_name_prefix = old_prefix
8285 ActiveRecord ::Base . table_name_suffix = old_suffix
You can’t perform that action at this time.
0 commit comments