question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

All data will be lost as migration files have changed

See original GitHub issue

Bug description

When creating a new migration, I “randomly” get something like: image

How to reproduce

Not sure exactly. It’s happening after creating new migrations but not every time. More information on what actually triggers this notification would be helpful in me determining how to reproduce it. How does it determine the files have changed, because the content is the same according to my source control?

Expected behavior

The latest migration I’ve just added is just adding: isAdmin Boolean? to a table. I wouldn’t expect ALL my data to need clearning.

Prisma information

I don’t want to share this publicly.

Environment & setup

  • OS: Windows
  • Database: Mysql
  • Node.js version: 14.17.0

Prisma Version

prisma               : 2.21.0
@prisma/client       : 2.21.0
Current platform     : windows
Query Engine         : query-engine e421996c87d5f3c8f7eeadd502d4ad402c89464d (at ..\..\node_modules\@prisma\engines\query-engine-windows.exe)
Migration Engine     : migration-engine-cli e421996c87d5f3c8f7eeadd502d4ad402c89464d (at ..\..\node_modules\@prisma\engines\migration-engine-windows.exe)
Introspection Engine : introspection-core e421996c87d5f3c8f7eeadd502d4ad402c89464d (at ..\..\node_modules\@prisma\engines\introspection-engine-windows.exe)
Format Binary        : prisma-fmt e421996c87d5f3c8f7eeadd502d4ad402c89464d (at ..\..\node_modules\@prisma\engines\prisma-fmt-windows.exe)
Default Engines Hash : e421996c87d5f3c8f7eeadd502d4ad402c89464d
Studio               : 0.371.0
Preview Features     : orderByAggregateGroup, selectRelationCount

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
webnoobcommented, Aug 16, 2021

Confirming that 2.29.0 has resolved this issue. One of my colleagues had the issue so I told him to update to .29 to see if it was fixed. It solved it immediately.

Nice job guys, thanks.

1reaction
Jolg42commented, Aug 3, 2021

Thanks @webnoob for the confirmation

A fix just got released in the dev channel on npm (not recommended for production).

If you can try this specific version 2.29.0-dev.20 to confirm it’s fixing the issue for you and let us know it will be greatly appreciated! 💚

It will be released next Tuesday in our biweekly release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deleted migration files- how to makemigrations without ...
2 Answers 2 · Empty the django_migrations table: delete from django_migrations; · Remove all the files in migrations folders in each and every...
Read more >
Migration troubleshooting in development
This guide describes how to resolve issues with Prisma Migrate in a development environment, which often involves resetting your database.
Read more >
How to Reset Migrations
Scenario 1: · 1. Remove the all migrations files within your project · 2. Drop the current database, or delete the db.sqlite3 if...
Read more >
Managing Migrations - EF Core
The migration scaffolding process warns when an operation might result in data loss (like dropping a column). If you see that warning, be ......
Read more >
Migrations | Django documentation
You have not changed your models since you made their tables. For migrations to work, you must make the initial migration first and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found