Quantcast
Viewing all articles
Browse latest Browse all 10318

Commented Issue: Issue migrating across schema changes [584]

The initial migration across a schema change works correctly, but then if the project is reverted and then updated again issues arise.

Repro:
create a project
Enable-Migrations
Add-Migration m0/Update-Database
F5 with the default schema (populate database)
change DbContext schema
Add-Migrations m1/Update-Database
run
Update-Database -TargetMigration m0
run
Update-Database
error -> The object with the name "Posts" already exists
Comments: for the first case, if you Update-Database after you get the "The object with name "Posts" already exists" message it complains that "There is already an object named 'Posts' in the database."

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>