Skip to content
Pre-MVP. The 1.0 codebase is not a released product — see the 1.0 product boundary.

Database migrations

Run from repository root.

  • Initial release: 20260908000000_init/migration.sql.
  • D1 mirror: backend/migrations-wrangler/0001_init.sql.
  • Prisma SQL owns schema history. Keep custom constraints and required seed rows.
  • Add future changes as new migrations. Never edit an applied release migration.
  • Generate D1 mirrors: npm run migrate:sync.
  • Check mirrors: npm run migrate:check.
  • Check Prisma schema agreement: npm run prisma:drift.
  • Apply locally: npm run local:migrate.
  • Remote database writes require explicit deployment authority.