I have a C# project where I am using Entity Framework 6.1 to manage the database. In the process of development I wanted to add some more fields to some of the tables. So I edited the InitialCreate.cs migration to include the new fields and then deleted my database within SQL Server. When I go to run Update-Database I get the following error ...
Unable to update database to match the current model because there are pending changes and automatic migration is disabled Since I had deleted the database from the server I didn't expect to get this error. There is no more migration table so I expected the modified version of the InitialCreate.cs file to be used to create the database. I am trying to avoid having multiple migrations in deference to a single InitialCreate.cs file. Why isn't the application just using the InitialCreate.cs file that have been editing directly? Why does it need to create a new migration file?
I know I could just use Add-Migration in the package manager console but I don't want multiple migration files. I just want one. I thought with code-first I could do this.