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

Integrate DB Tool for Schema Migration #2243

Open
laruh opened this issue Oct 15, 2024 · 0 comments
Open

Integrate DB Tool for Schema Migration #2243

laruh opened this issue Oct 15, 2024 · 0 comments
Labels
improvement: database priority: Backlog Tasks not yet scheduled or lower priority.

Comments

@laruh
Copy link
Member

laruh commented Oct 15, 2024

Currently, we are using only rusqlite without any additional tools, which requires us to implement custom migration functionality and handle schema updates manually. It is worth exploring the possibility of using DB clients or migration tools to simplify and improve the management of database schema migrations. Below is a table of existing crates that support SQLite.

Crate Type Migration Tool Needed Supports Async? Pros Cons
Diesel ORM, DB Client Built-in CLI Tool No Strong type safety, ORM features Steep learning curve, boilerplate
SeaORM ORM, DB Client sea-orm-migration Yes Async, declarative models Newer, less mature
SQLx DB Driver Built-in migration tool Yes Async, compile-time query checking Requires manual SQL queries
refinery Migration Tool Works with rusqlite, PostgreSQL, MySQL No Easy to integrate, supports various DBs, version control for migrations Requires manual management of migration scripts
ruma_migrations Migration Tool Works with rusqlite No Easy to integrate Requires writing migration logic manually
Barrel Migration Tool Works with rusqlite No Declarative, uses Rust code to define migrations Less mature, not a full ORM solution

Migration Tool Needed: Indicates which additional tool or database the migration tool works with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement: database priority: Backlog Tasks not yet scheduled or lower priority.
Projects
None yet
Development

No branches or pull requests

2 participants