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 establish connection to the alias hijacking. #427

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abMatGit
Copy link

This fixes #426
Kudos to @camertron! \o/

Proposed solution:

Alias the establish_connection method to explicitly and return an establish_connection_without_octopus connection.

This will cause establish_connection configuration_without_database to return a MySQL2::Adapter class instead of a Octopus::Proxy class, from which we can successfully call connection.create_database and bypass Octopus::Proxy#method_missing

@thiagopradi
Copy link
Owner

hey @abMatGit - could you check why the test suite is failing? Thanks

@mckinnsb
Copy link

mckinnsb commented Jun 6, 2017

It seems like the tests are failing because he replaced octopus_establish_connection with establish_connection. Wondering if this will work if establish_connection is just aliased to octopus_establish_connection.

@mckinnsb
Copy link

mckinnsb commented Jun 8, 2017

It doesn't - I think this will require a more significant patch.

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.

Cannot run rake task db:create with mysql.
3 participants