Skip to content

Database backend abstraction (SQLite → PostgreSQL migration path) #45

@andrewmarconi

Description

@andrewmarconi

Summary

Abstract the database layer in engine-core to support multiple backends, enabling a future migration from SQLite to PostgreSQL without breaking the application.

Context

The current stack uses better-sqlite3 with Drizzle ORM. The database file lives at ./data/ceegee.db with WAL mode. As the application moves toward production deployment (Docker, multi-instance), PostgreSQL support will be needed.

Scope

  • Abstract the database connection layer to support both SQLite and PostgreSQL
  • Use Drizzle ORM's multi-dialect support
  • Environment-variable-driven backend selection (e.g., DATABASE_URL)
  • Ensure migrations work for both backends
  • Keep SQLite as the default for local development

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions