C
C#•2mo ago
gwon8266

Solution to remove previous migrations and use a new migration without dropping database.

I built a simple ecommerce platform and I already have seeded users, products uploaded and so on. But I recently made a change, where I added role based authorization. When I generated the Migration file for this change, and added it, I was getting an error. This made me drop the entire database and run the recently generated Migration file and it worked perfectly Is there a better way for me to do this. Thank you
2 Replies
Salman
Salman•2mo ago
maybe delete all the previous migrations and then apply the new one again but not sure if it'd work though .. in such cases I also just drop the db lol
gwon8266
gwon8266OP•2mo ago
Thats what i did too 😂 I was thinking there was a better way to do this
Want results from more Discord servers?
Add your server