I upgraded from rails 5.2.3 to 6.1.0 and noticed that my migration log for add_reference has changed.
With Rails 5 it simply had:
-- add_reference(:categories, :user, {:foreign_key=>true})
-> 0.0063s
With Rails 6 I get this:
-- update_table_definition(:categories, ...)
-> 0.0001s
-- add_column("categories", "user_id", :bigint, {})
-> 0.0027s
-- add_index("categories", ["user_id"], {})
-> 0.0041s
-- add_foreign_key("categories", "users", {:column=>"user_id"})
-> 0.0021s
Which is a problem because the second parameter of update_table_definition (the ... part) is an instance of my migration class and prints 4 screens of text.
Is there a way to get back the simple printout of Rails 5? I know I can turn off migration logs with VERBOSE=false, but then I lose all the migration logs.
The add_reference method and missing_parameter, say_with_time methods (that prints the logs) seemingly didn't change between the two Rails versions.
question from:
https://stackoverflow.com/questions/65541057/long-rails-6-migration-printout 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…