© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•15mo ago•
3 replies
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Local Database to Server Database migration
C#CC# / help
4y ago
creating migration for a database
C#CC# / help
4y ago
❔ Getting a variable from a GameObject without dragging and dropping it in
C#CC# / help
3y ago
Remove-Migration and Add Migration not correctly working how i expected
C#CC# / help
17mo ago