I am using Entity Framework 5.0 RC with the LocalDB database that comes pre-configured with VS 2012 RC for some prototyping and testing of code-first database.
After a few cycles of changing my code-first database and running "update-database" I did a huge breaking change and automatic migration failed bad. I don't care about resolving this conflict since this is just prototyping, so losing data is fine.
How do I reset or delete the database? Reset must also reset the migration table, which seems to be hidden from Server Explorer in Visual Studio.
Drop the whole database in Visual Studio
So far this is the best approach I have found.
To alter __MigrationHistory table, see this article to handle both existing databases and new databases created with code-first.
The SQL script is as follows:
EXEC sp_MSforeachtable @command1 = "DROP TABLE ?";
I am using Database .NET v4 Free to run this SQL script, because my Visual Studio 11 RC copy won't let me run queries on LocalDB for some reason. Also, I need to run the script twice for it to drop all tables due to some foreign keys. I haven't bothered fixing this since it seems to work well enough as it is.