All data will be lost as migration files have changed
See original GitHub issueBug description
When creating a new migration, I “randomly” get something like:
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:
- Created 2 years ago
- Reactions:1
- Comments:15 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.