Hi,
I am working on an ASP.NET MVC 5 Razor application with Code First approach. I do the database updates in my test platform through NuGet Package Manager Console using the following command-
update-database -script -SourceMigration 0
If I am not wrong, I above command should generate a database queries for the pending updates without applying the changes to database and then I need to run the queries on my database. The problem in my case is-
- The above command apply the update database when I run it on NuGet Package Manager Console and generate the queries.
- The above command generate the queries not only for pending database changes, but also for previous updates which are already available in database.
So, when I move my code from development to test platform and run the queries on test database, it generates error because most of the things are already in the test database
I have no idea why it is happening, any idea how to resolve it?
Thanks in advance.