0

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?

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Rubia Gardini
  • 815
  • 5
  • 16
  • 30

1 Answers1

2

What I do is

  1. Have a database project in VS2010 so I can create a fresh database with latest schema.
  2. Backup the Azure database locally with RedGate SQL Azure Backup.
  3. Use RedGate Compare to compare the databases and create a diff script.
  4. Run the script to make sure it works locally on my backup from step 2.
  5. Run the script on Azure.
Craig
  • 36,306
  • 34
  • 114
  • 197
  • Thank you Craig, I was feeling unsafe about making changes in Database with real information, and not only test information. – Rubia Gardini Oct 15 '11 at 03:42
  • That is why I test it locally first. You can also perform a COPY of you SQL Azure database in case of disasters. – Craig Oct 15 '11 at 11:59