Skip to content

Commit

Permalink
Diff entire db directory instead of migrations directory (#186)
Browse files Browse the repository at this point in the history
* diff entire db directory instead of migrations directory
* update changelog
  • Loading branch information
Byron Bowerman authored and mattbrictson committed Sep 26, 2016
1 parent 842d1fc commit 18b8fd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# master

* Your contribution here!
* Diff entire db directory when determining if migrations are needed

# 1.1.8 (Sep 13 2016)

Expand Down
6 changes: 3 additions & 3 deletions lib/capistrano/tasks/migrations.rake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace :deploy do
task :migrate => [:set_rails_env] do
on fetch(:migration_servers) do
conditionally_migrate = fetch(:conditionally_migrate)
info '[deploy:migrate] Checking changes in /db/migrate' if conditionally_migrate
if conditionally_migrate && test("diff -q #{release_path}/db/migrate #{current_path}/db/migrate")
info '[deploy:migrate] Skip `deploy:migrate` (nothing changed in db/migrate)'
info '[deploy:migrate] Checking changes in db' if conditionally_migrate
if conditionally_migrate && test("diff -q #{release_path}/db #{current_path}/db")
info '[deploy:migrate] Skip `deploy:migrate` (nothing changed in db)'
else
info '[deploy:migrate] Run `rake db:migrate`'
invoke :'deploy:migrating'
Expand Down

0 comments on commit 18b8fd1

Please sign in to comment.