capistrano / rails

Official Ruby on Rails specific tasks for Capistrano
http://www.capistranorb.com/
MIT License
867 stars 270 forks source link

Add migration_command accessor for overriding #242

Closed the-undefined closed 4 years ago

the-undefined commented 4 years ago

Summary

Exposing the accessor migration_command allows more flexibility in running migrations.

With rails 6 multiple database support the db:migrate command isn't always what is needed when deploying to an environment.

Other usecases can include only running migrations for one of the databases, using something like db:migrate:primary.

Short checklist

Other Information

Our app only has access to migrate one of the databases the rails application connects to, so currently we get an error when trying to deploy without this change.

A side note, locally when I run the deployment but pointing to our fork of this gem I need to use bundle exec cap instead of just cap, just incase anybody else tries using the fork.

Thanks for the great library! ❤️ Let me know if you need any changes.

capistrano-bot commented 4 years ago

Thanks for the PR! This project lacks automated tests, which makes reviewing and approving PRs somewhat difficult. Please make sure that your contribution has not broken backwards compatibility or introduced any risky changes.

Generated by :no_entry_sign: Danger

taylorwilliams commented 4 years ago

👍

mattbrictson commented 4 years ago

Nice, thanks for the well documented PR!