Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add migration_command accessor for overriding #242

Merged
merged 1 commit into from
Jul 11, 2020

Conversation

the-undefined
Copy link
Contributor

@the-undefined the-undefined commented Jul 9, 2020

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

  • If you are fixing a bug or introducing a new feature, did you add a CHANGELOG entry?

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.

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

Other usecases are only running migrations for one of the databases using
something like `db:migrate:primary`.

Exposing the accessor `migration_command` allows flexibility for more scenarios.
@capistrano-bot
Copy link

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 🚫 Danger

@taylorwilliams
Copy link

👍

@mattbrictson
Copy link
Member

Nice, thanks for the well documented PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants