-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Dump SeaORM Dependency from SeaSchema's Migrator #57
Comments
@tyt2y3 thoughts? |
If we remove the dependency all-together, how do we expose a proper connection inside the migration script? sea-schema/tests/migration/src/m20220118_000003_seed_cake_table.rs Lines 15 to 21 in e28bd81
|
Opppps. You're right! Then, we should split |
If the solution is suitable, I can prepare PR. |
I don't understand how that'd help the current situation. The culprit is that we have an inter-locked release procedure:
Which is kind of wrong. Ideally, it should be:
May be the best and simplest way is to move the sea-orm facing functionalities (migrator logic) into sea-orm-cli itself, and leave only the schema manager in sea-schema. |
For sea-schema, we could keep most of the migrator logic intact while introduce a new connection trait, |
Motivation
A dependency tree of a typical SeaORM application looks like this. Which SeaORM is depends by the application and the underlying SeaSchema migrator. This is hard to maintain and difficult to release new version of SeaORM.
Solution
We could get rid of SeaORM dependency on SeaSchema's migrator, and manage the connection to various db backend with
sqlx::Any
.sqxl::Pool::any_kind
method can be used to identify the db backend of current connection.The text was updated successfully, but these errors were encountered: