Reputation: 9709
I was using EF5 code first and migrations right from the start.But I messed up something and decided to reset my migrations.
I did enable-migrations -force
Then tried add-migrations xyz
I expected only to see incremental changes (addition of 2 tables) Instead it tries to recreate every table.I dont want this to happen as it is shared via GIT and I need to push the migration also.
I have deleted all migration history and folder.What I want is a way to do another migration and it should only do the incremental create tables as other tables are already there
Upvotes: 1
Views: 679
Reputation: 69250
You need to do this in two steps:
-ignore-changes
switch (see my command reference)Please note that whenever you mess manually with the migrations you need to be careful with the state of the metadata or you can get really nasty surprises.
Upvotes: 2