Skip to content

feat(db): own a dedicated Postgres schema and ship SQL migrations with migrate and export commands #374

Open

Description

@Bccorb

Part of #371.

Problem

The API's tables live in the default schema, alongside whatever the adopter's app owns. Adopters sharing a database with their app hit ORM drift detection (prisma migrate dev sees unknown tables and offers a reset; drizzle-kit needs a schemaFilter). Migrations are sequelize-cli .cjs files that only this repo's tooling can run.

Proposal

  • Tables in a configurable schema (default seamless_auth) via search_path, with the migrations table inside it
  • Plain numbered SQL as the migration source of truth, converted from the existing sequelize-cli chain, with an upgrade path for existing deployments
  • Run on boot or through a migrate command for teams that do not run DDL at boot; assertSchemaCurrent keeps its role
  • migrations export --format prisma|drizzle|knex|flyway|raw for organisations that review every DDL change
  • Docs: one-line ORM config to ignore the schema, and referencing users by ID

Activity

  1. added
    enhancement
    P4
    v1.0
    safe
    on Oct 8, 2026
  2. added this to the v1.0 milestone on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4enhancementsafev1.0

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions