Skip to content

Commit

Permalink
fixing deployment issues wtih database migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
sfisher committed May 20, 2019
1 parent 09fc5a0 commit f9f897d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 595 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ config/initializers/secret_token.rb
# We hope to avoid lots of extra commits when database schemas change in engines and get propagated into the app schema.rb.
# if this becomes a problem we can un-ignore it. We think rake db:migrate will just update this file based on the migration history and
# it may not be needed except as a convenience.
#
# Nope, causes errors with stage deploy, get rid of it.
# db/schema.rb
db/schema.rb

# Only include if you have production secrets in this file, which is no longer a Rails default
# config/secrets.yml
Expand Down
4 changes: 4 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
set :passenger_log, "#{deploy_to}/passenger.log"
set :passenger_port, "3000"

# Run migrations on the app server, otherwise they only run on the db role server
# See https://github.com/capistrano/rails/issues/78
set :migration_role, :app

TAG_REGEXP = /^[v\d\.]{3,}.*$/.freeze

namespace :debug do
Expand Down
Loading

0 comments on commit f9f897d

Please sign in to comment.