-
Couldn't load subscription status.
- Fork 56
(wip) Trilogy adapter support #132
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
base: master
Are you sure you want to change the base?
Conversation
03dd91d to
0a35ff9
Compare
96f4d58 to
3ae2df4
Compare
3ae2df4 to
a525937
Compare
828f1ab to
56cb327
Compare
e71729b to
d9131a8
Compare
a host:port combo for connections to the db in tests
d9131a8 to
7b1112f
Compare
|
|
||
| ### Trilogy Adapter Support | ||
|
|
||
| Starting in Rails 8.1 we add support for the use of the trilogy database adapter gem. Logic for selecting an adapter follows this logic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be a problem to support trilogy since rails 7.1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also wondering if it wouldn't be possible to get that from the original connection. On my original attempt to implement trilogy support I remember trying that but ended up with the configuration like you did, but I was wondering whether that wasn't possible now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can derive it from the connection, i'm not 100% there yet with this pr but once i am we can answer the pre 8.1 for complexity if someone is actually needing in rails 8.0 or before.
My initial thought is to put it in 8.1 and beyond so that as people upgrade they will be able to use it.
7.1 is EOL October 1st
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7.1 -> 8.0 and 8.0 -> 8.1 are easy upgrades, so I won't bother about supporting previous versions.
| end | ||
| end | ||
|
|
||
| extend Forwardable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we forget this here in previous PRs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈 yes my bad
| # We need the OS not to buffer the IO to see pt-osc's output while migrating | ||
| $stdout.sync = true | ||
|
|
||
| Departure::RailsAdapter.for_current.register_integrations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this not needed anymore? Did this get moved to the railtie?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still tinkering but hoping to pull all the registration into the railtie, if not this will have to work and go back in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on this, a railtie is the most appropriate place for registration.
…on now that we aren't automatically connecting to departure when loading the library and instead putting that logic in a railtie
This PR adds the ability for teams to use trilogy instead of mysql2 for their adapter. Basic logic is this
Due to changes in #131 and #128 it is essentially a new adapter that does very little except pass alter statements to pt-online-schema-change and ensure that add/remove index have
There is some duplication in this that i will probably pull to a concern but opting to keep separate while in WIP
Logic for the adapter selection is documented in the readme
Db Adapter Support
Starting in Rails 8.1 we add support for the use of the trilogy database adapter gem. Logic for selecting an adapter follows this logic