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.
Would it be a problem to support trilogy since rails 7.1?
There was a problem hiding this comment.
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.
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.
7.1 -> 8.0 and 8.0 -> 8.1 are easy upgrades, so I won't bother about supporting previous versions.
| @@ -33,8 +33,6 @@ def visit_DropForeignKey(name) # rubocop:disable Naming/MethodName | |||
| end | |||
| end | |||
|
|
|||
| extend Forwardable | |||
There was a problem hiding this comment.
Did we forget this here in previous PRs?
| # 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.
Why is this not needed anymore? Did this get moved to the railtie?
There was a problem hiding this comment.
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.
+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
… and yeild a block
…abase helper in integration spec
ec5f4dd to
81cbeaa
Compare
81cbeaa to
aad936b
Compare
Failure/Error: test_database.setup ActiveRecord::ConnectionNotEstablished: trilogy_auth_recv: caching_sha2_password requires either TCP with TLS or a unix socket: TRILOGY_UNSUPPORTED
| require 'departure' | ||
| require 'forwardable' | ||
|
|
||
| module ActiveRecord |
There was a problem hiding this comment.
Core change - add rails 8.1 trilogy adapter
| # rubocop:enable Metrics/PerceivedComplexity | ||
| if ar_version::MAJOR == 8 && ar_version::MINOR.positive? | ||
| V8_1_Adapter | ||
| if db_connection_adapter == 'trilogy' |
There was a problem hiding this comment.
Core change - allow trilogy to be a specified adapter
…nside of our initializer
abe54c7 to
d2a2880
Compare
0ae5621 to
9fbc420
Compare
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