PrismaP
Prisma8mo ago
Vincent

Upgrade from 6.0.1 -> 6.5.0 broke migrate dev

I recently upgraded from 6.0.1 to 6.5.0, and didn't change any migrations or schema files. But when I run
migrate reset
and then run
migrate dev
I am now receiving an exit code of 130 whereas previously I could generate migrations without issue. This happens regardless of if I modify a schema file or not.

The output of the command looks like this:
Drift detected: Your database schema is not in sync with your migration history.

The following is a summary of the differences between the expected database schema given your migrations files, and the actual schema of the database.

It should be understood as the set of changes to get from the expected schema to the actual schema.

[+] Added extensions
  - pg_cron

We need to reset the "public" schema at "localhost:54322"

You may use prisma migrate reset to drop the development database.
All data will be lost.
Command failed with exit code 130: /private/var/folders/1h/l7bdt8tx7c76sr7spy1ndmbh0000gn/T/xfs-20fb55b8/prisma migrate dev


The pg cron warning is something we have seen before, and I don't believe is related to the issue here, as we have been using the workaround described here for years without issue: https://github.com/prisma/prisma/issues/18214. But given the lack of any stack trace, its difficult to tell what is going wrong, as it just stops before doing anything at all. Here is 6.0.1 output:
Prisma schema loaded from schema
Datasource "db": PostgreSQL database "postgres", schema "public" at "localhost:54322"

Drift detected: Your database schema is not in sync with your migration history.

The following is a summary of the differences between the expected database schema given your migrations files, and the actual schema of the database.

It should be understood as the set of changes to get from the expected schema to the actual schema.

[+] Added extensions
  - pg_cron

? We need to reset the "public" schema at "localhost:54322"
Do you want to continue? All data will be lost. › (y/N)
GitHub
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB - Issues · prisma/prisma
Was this page helpful?