Skip to content

[Backend] migration_lock.toml declares sqlite but the datasource is postgresql, breaking prisma migrate #525

@ogazboiz

Description

@ogazboiz

Join the discussion on Telegram

Why this matters

backend/prisma/migrations/migration_lock.toml contains:

provider = "sqlite"

but the datasource in backend/prisma/schema.prisma is PostgreSQL (provider = "postgresql"), and every migration uses Postgres-only SQL (ADD CONSTRAINT, multi-column ALTER TABLE ... ADD COLUMN). Prisma validates the lock-file provider against the datasource on every migrate dev / migrate deploy and aborts with a provider-mismatch error when they differ.

This is production-blocking: render.yaml runs npm run prisma:deploy (= prisma migrate deploy) as its startCommand, and backend/package.json exposes both prisma:migrate (migrate dev) and prisma:deploy (migrate deploy). The only reason CI is green is that CI uses prisma db push instead of migrate, which ignores the lock file — so the breakage is invisible until a real deploy.

Acceptance criteria

  • Set provider = "postgresql" in backend/prisma/migrations/migration_lock.toml.
  • Verify npx prisma migrate deploy runs cleanly against a fresh Postgres database (in tandem with the duplicate-migration fix tracked separately).
  • Confirm prisma migrate status reports no drift / no provider error.

Files to touch

  • backend/prisma/migrations/migration_lock.toml

Out of scope

  • The duplicate pause-state-field migration collision (tracked in its own issue).
  • Switching CI from db push to migrate deploy.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend related tasksbugSomething isn't workingdatabasePostgreSQL / Prisma

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