Skip to content

1525-05: Migrate SQLite and MySQL drivers to sqlx #1717

@josecelano

Description

@josecelano

Goal

Move the existing SQLite and MySQL SQL backends to a shared async sqlx substrate before adding PostgreSQL.

Why

PostgreSQL should not be added as a special case. The existing SQL backends need to follow the same async persistence model first so PostgreSQL can land on a common foundation.

Spec

The detailed implementation spec currently lives in:

docs/issues/1525-05-migrate-sqlite-and-mysql-to-sqlx.md

Summary

  1. Add sqlx and async persistence infrastructure alongside the current sync drivers.
  2. Implement parallel async SQLite and MySQL drivers.
  3. Replace the sync traits and drivers in one focused switch commit.
  4. Update consumer call sites to await async database methods.
  5. Remove legacy r2d2, rusqlite, and mysql driver dependencies once the switch is complete.

Acceptance Criteria

  • SQLite and MySQL drivers use sqlx with async trait methods.
  • Schema initialization is lazy; build() no longer eagerly creates tables.
  • Schema management uses raw sqlx::query() DDL, not sqlx::migrate!().
  • Legacy sync driver dependencies are removed from tracker-core.
  • cargo test --workspace --all-targets passes.
  • linter all exits with code 0.
  • cargo machete reports no unused dependencies.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions