Q:

EF Code first automatic migration totally messed up

I'm not sure what I've done, but I get this error when publishing to azure:
Automatic migration was not applied because it would result in data loss. 

Now this is very distubing.  My models match my database 100% - so is there a chance there might be data loss if I force it?  I'm really confused what to do now. 
So much for auto migrations :S Not much automation :) 
I think my error was that I created new models, published it and EF created new tables for them.  I then remembered that I forgot do add the models to my DbContext.  So I added the new DbSets to context and published.  That's probably where it went wrong.  But then again, I didn't know that EF added models to the database if they aren't POCO classes or what ever they are called.  Might have been some foreign keys that triggered.. dunno.  Anyways I went undo frenzy on my code and deleted all the newly created tables and stuff to get me to my starting point.  I thought that might solve it.  But noooee stupid me. 
Any ideas where to start on this issue?  Im gonna jump off a cliff I lose my data :)

A:

You can have EF create the SQL for you, so you can implement the migration manually.   In the package manager console enter:
update-database -v -f -script

It will open a new window with the SQL that you can look over, and then apply yourself directly to the database.   The last line that enters an entry into the migration history will allow the DbContext to know it's looking at the correct version.