Migrate: 5387 - Can't make migrations

Created on 14 May 2020  路  5Comments  路  Source: prisma/migrate

It took me a little bit to figure out what I was doing wrong, but I was pointing to a database from a different project. The error messaging is different from beta.4, so it lead to a bit of confusion.

Error in 2.0.0-beta.5

Error in migration engine.
Reason: [migration-engine/connectors/sql-migration-connector/src/lib.rs:240:9] Deserializing the
database migration failed.: Error("missing field dataType", line: 0, column: 0)

Error given in 2.0.0-beta.4

Error: There are more migrations in the database than locally. This must not happen. Local migration ids: . Remote migration ids: 20200505195906-init, 20200505200209-removeuser, 20200505200520-makeunique, 20200505202754-makeuniquetext, 20200505203343-removeuniquetext

bu0-needs-info kinbug

Most helpful comment

Looks like the migration are out of sync. Migrate is in experimental phase so this might happen sometimes.

In order to fix it you will need to reset your migrations. Delete the _Migration table in your database and also delete prisma/migrations folder and try again with the latest version

All 5 comments

Looks like the migration are out of sync. Migrate is in experimental phase so this might happen sometimes.

In order to fix it you will need to reset your migrations. Delete the _Migration table in your database and also delete prisma/migrations folder and try again with the latest version

@pantharshit00 This worked for me, thanks!

Thanks, it works. Just a minor notice: you should delete the _Migration table, not _Migrations

@RoMay Oh yeah, typo from my side. Updated the comment

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jwld picture jwld  路  3Comments

ff-anthony-soto picture ff-anthony-soto  路  3Comments

sameoldmadness picture sameoldmadness  路  4Comments

2013-11390 picture 2013-11390  路  3Comments

nickreynke picture nickreynke  路  4Comments