I am carrying out a web application using EF 4., and using the "model first" approach - and so i define my organizations, produce a DDL and make up a database structure based the model.

Now, each time something alterations in the model, I regenerate the DDL and also the database structure is recreated on your own - tables are dropped and recreated. Within this process, I lose all configuration data which was already. This really is fine for the time being, but moving forward, when the application would go to production, the way I have the ability to upgrade the database basically choose to change something?

To simplify, (how) can one upgrade the database in the model and all of the data?


You'll need another workflow or T4 templated for DB generation. It's already obtainable in Entity Designer Database Generation Power pack extension for Visual Studio 2010. The only issue is the fact that these workflows are utilizing database tools from Visual Studio that are only accessible in Premium and supreme edition.

Without having Versus 2010 Premium or Ultimate you have to deploy new DB to check atmosphere first and write diff script by her or buy some diff script generator - I suggest DB tools from Red Gate.