Closed ghost closed 8 years ago
This seems reasonable. Schema.rb should be capturing the changes no matter what.
On a side-note, I thought engine migrations were used with the rake your_engine_name:install:migrations
task to copy them into the app dir…
That's the default behavior; but, this particular project is using something like https://blog.pivotal.io/labs/labs/leave-your-migrations-in-your-rails-engines to keep the migrations inside the engines.
Yes, this looks good. Thanks! Can you add a CHANGELOG entry under the Your contribution here!
bullet?
Hmm, on second thought, this would not work if a project is using structure.sql
instead of schema.rb
. I would prefer a PR that compares the whole db
directory; that would be a safer and more comprehensive approach.
Sorry about the delay, I got distracted by other things. New PR opened.
I have a project that dynamically includes migrations from rails engine(s). The engine migration files aren't in
db/migrate
, so diffing that directory wasn't catching changes to my database.It may be a better idea to just diff the whole db directory, but the simplest change for my use-case was to just diff the schema.rb.
There aren't any tests so ¯(°_o)/¯