product · inferred from evidence
P3018
A specific error code in Prisma indicating a failed migration.
- Drift detected: Your database schema is not in sync with your migration history
Fixes the Prisma 'Drift detected: Your database schema is not in sync with your migration history' error by deciding whether the database or the migration history is the source of truth, then reconciling the two. Use when migrate dev refuse
- P3018: A migration failed to apply. New migrations cannot be applied before the error is recovered from.
Fixes Prisma error P3018 'A migration failed to apply' by deciding whether the failed migration's changes actually landed, then marking it rolled back or applied with migrate resolve. Use when migrate deploy stops with P3018 and new migrati
- P3006: Migration `20240101_init` failed to apply cleanly to the shadow database.
Fixes Prisma error P3006 'Migration failed to apply cleanly to the shadow database' by finding the SQL in the migration that the empty shadow database cannot run, usually generated columns, extensions, or permissions, and rewriting it. Use
- P3005: The database schema is not empty.
Fixes Prisma error P3005 'The database schema is not empty' during migrate deploy by baselining the existing database: mark the initial migration as already applied with migrate resolve --applied instead of letting migrate try to create tab