WaspW
Wasp11mo ago
mgp25

Missing migrations

  • Wasp version: 0.13.x
I have an instance were it seems it is missing the migrations files, so when running in prod, wasp db migrate-dev we face the following issue:

🐝 --- Starting database migration... ---------------------------------------------

Environment variables loaded from .env
Prisma schema loaded from ../db/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "127.0.0.1:5432"

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.

...
...
... 

✔ We need to reset the "public" schema at "127.0.0.1:5432"
Do you want to continue? All data will be lost. … no


I have already tried wasp clean and running wasp db migrate-dev, but the same problems remains. I have also tried removing the migration from:

DELETE FROM _prisma_migrations WHERE migration_name = '20241128215415_';


Same problem is happening. And yes, keeping data is a must. Any idea how to solve this?

Thank you!
Was this page helpful?