I'm designing a database that it's not totally 开发者_开发问答defined yet, and as the project goes, it won't be defined very soon. However, the project will be online very soon, and database will be changing online. So, I need be prepared to database changes. Add tables, add columns, whatever.
I'm not used to Entity Framework, but I already tried all approaches (code first, database and model first) and I like most the Model First approach, cuz I'm not used to relations yet and Model First do that for me.
The problem is: my server is Windows Azure, and I have to script SQL Azure (I still wonder why Microsoft changed that.........)
So, my question is: - What should I do, step-by-step, to update my Model and update my database when Model changes?
What I do is
- Have a database project in VS2010 so I can create a fresh database with latest schema.
- Backup the Azure database locally with RedGate SQL Azure Backup.
- Use RedGate Compare to compare the databases and create a diff script.
- Run the script to make sure it works locally on my backup from step 2.
- Run the script on Azure.
精彩评论