I personally use a different resolution strategy for both migrations and bundler.
Bundler
- As of sometime in 1.0, it should be fine to always run
bundle install without running the check first. If the check is required, that's a bug. So if the Gemfile changes, it should be equally fast to run bundle install again.
- If there is a conflict in
Gemfile.lock, I propose the following resolution strategy:
git checkout Gemfile.lock -- <older branch>
bundle install
- this is because bundler already knows how to resolve conflicts between
Gemfile and Gemfile.lock, and will properly handle all the edge-cases we know about
Migrations
For similar reasons, I propose the following resolution strategy for conflicts in schema.rb
git checkout db/schema.rb -- <older branch>
rake db:migrate
- Again,
rake db:migrate knows how to bring a schema.rb up to date with newer migrations
Is there any reason my thinking here is incorrect?
I personally use a different resolution strategy for both migrations and bundler.
Bundler
bundle installwithout running the check first. If the check is required, that's a bug. So if theGemfilechanges, it should be equally fast to runbundle installagain.Gemfile.lock, I propose the following resolution strategy:git checkout Gemfile.lock -- <older branch>bundle installGemfileandGemfile.lock, and will properly handle all the edge-cases we know aboutMigrations
For similar reasons, I propose the following resolution strategy for conflicts in schema.rb
git checkout db/schema.rb -- <older branch>rake db:migraterake db:migrateknows how to bring aschema.rbup to date with newer migrationsIs there any reason my thinking here is incorrect?