I'm using VS2012 and EF 5.0 with a model first approach. I am wondering if there is any good way to generate incremental DDL to update model changes without dropping all the tables and losing the data I have in there already.
I like to use a SQL server data project within Visual Studio to keep my data in sync with the database - it's like a mini SQL server schema store.
Basically what we are doing here is updating the schema of the data project using the model's DDL script, then comparing and pushing those changes out to the database. Just be sure to generate your model's DDL script first.
Every time you want to update your database just generate and import your models' sql script, compare, and update. It takes a couple steps but works perfectly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With