1

I am running Rails 6.1.6 on ruby -v 2.7.1.

I set this in my application.rb file

config.active_record.schema_format = :sql

I tried to run my migrations but schema.rb gets generated even as the existing structure.sql file gets updated accordingly.

Extra info: I observed this behaviour when I upgraded to Rails 6.1 from 5.2.

I don't suppose schema.rb should ever be generated when schema_format is set to :sql. When I tried to set config.active_record.dump_schema_after_migration to false. My structure.sql file does not get updated.

What may I be missing or doing wrong?

Van_Paitin
  • 3,678
  • 2
  • 22
  • 26
  • 1
    Does this answer your question? [In Rails 5, setting config.active\_record.schema\_format = :sql but still getting schema.rb created on db:migrate](https://stackoverflow.com/questions/41369035/in-rails-5-setting-config-active-record-schema-format-sql-but-still-getting) – Ankit Aug 04 '22 at 02:52

0 Answers0