Skip to content

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

Closed

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.

Activity

  1. self-assigned this
    on Apr 29, 2026
  2. added a commit that references this issue on Jul 20, 2026
    b6a545a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions