Categories
asp.net-mvc entity-framework entity-framework-4 migration sql

Entity framework and migrations – how to update my database on remote server?

I enabled migrations for my entity framework application. Now, i want to update my database on my remote server. I ran this command:

PM> Update-Database -Script 

So it generated a sql script. But, this script has all the metadata that I actually have in my database, and not the changes that were made; so, when I try to run this sql script on my remote server, it says that tables already exists.

How can i generate sql script, that will contain only necessary updates?