You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of rails 6.1 rake db:structure:{load|dump} are deprecated and db:schema:{load|dump} are called under the hood. This results in the schema task in hair trigger creating a schema.rb for the project even though it is not required.
Steps to Reproduce
Create a new 6.1 rails app and set the schema_format to :sql
Run migrations, a schema.rb will be created.
Possible Solution
Update the schema:dump task in hair_trigger to use ActiveRecord::Base.schema_format value to determine if the schema.rb file should be generated.
The text was updated successfully, but these errors were encountered:
I've attempted a fix in my fork, basically just setting the previous schema before the regular tasks. It seems to work, but I'm not clear on the use case for setting the previous schema exactly; so I can't verify if everything still works; but the output is the same and when using format=sql, it does only generate a structure.sql.
Fix for #93.
Behavior stays the same as it was for Rails 5 and above.
As it's said in the issue, we don't need to generate a `schema.rb` when
we don't have the setting `schema_format = :ruby`.
Description
rake db:structure:{load|dump}
are deprecated anddb:schema:{load|dump}
are called under the hood. This results in the schema task in hair trigger creating aschema.rb
for the project even though it is not required.Steps to Reproduce
schema_format
to:sql
schema.rb
will be created.Possible Solution
schema:dump
task inhair_trigger
to useActiveRecord::Base.schema_format
value to determine if theschema.rb
file should be generated.The text was updated successfully, but these errors were encountered: