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

DATABASE_URL compatibility with mysql2://... #67

Open
joevandyk opened this issue Oct 20, 2023 · 1 comment
Open

DATABASE_URL compatibility with mysql2://... #67

joevandyk opened this issue Oct 20, 2023 · 1 comment

Comments

@joevandyk
Copy link

We're looking to migrate from mysql2 to trilogy.

We are using a DATABASE_URL like mysql2://.....

Say we're migrating to trilogy. That DATABASE_URL (right now) can't be used if there's no mysql2 gem loaded. So we would need to somehow magically switch to a different DATABASE_URL env var when the new apps boot.

On systems like heroku, I believe this would require a bit of downtime - shutdown running version, update DATABASE_URL from mysql2:// to trilogy://, then deploy the new app.

Is there a way around this where we can use trilogy using a DATABASE_URL containing mysql2:// ?

@D-system
Copy link

D-system commented Jan 4, 2024

You can install both adapters (mysql2 and trilogy), update the environment variable (in Heroku it will trigger a new deployment or similar) then you can remove the mysql2 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

No branches or pull requests

2 participants