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

Fix database_create_command? check #190

Merged
merged 1 commit into from
Jun 29, 2022

Conversation

tycooon
Copy link

@tycooon tycooon commented Jun 28, 2022

Currently this check doesn't work with rails db:create command since rails replaces ARGV. This fix makes it work for both rails and rake versions.

@JonathanTron
Copy link
Member

Hi @tycooon the change looks good. Thanks for taking the time to open the PR!

@JonathanTron JonathanTron merged commit df75801 into TalentBox:master Jun 29, 2022
@tycooon tycooon deleted the fix-rails-db-create-command branch June 29, 2022 12:16
@tycooon
Copy link
Author

tycooon commented Jun 29, 2022

Thank you!

By the way, I found this issue while working on adding Sequel support for rails dbconsole command. It looks like Rails commands are not very extendable, but I found some monkey-patchey way to make it work (only for pg for now).

You can find a draft of the code here https://github.com/umbrellio/umbrellio-sequel-plugins/blob/add-console-task/lib/umbrellio_sequel_plugins/rails_db_command.rb. This file should be required in Rails boot.rb file since it patches the Rails::Command::DbconsoleCommand class :(

Would you be intrested in supporting this feature in this gem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants