Wednesday, December 12, 2012

Windows Azure (Part 1) Migrator Dotnet

I like to use Migrator Dotnet in my projects to manage database changes during development.  I know EF has it's own migration engine and I really should use it, however I just like Migrator Dotnet better.

One thing I was worried about when I was moving a site over to Azure Websites, and Sql Azure, was how to manage database changes.  I new Windows Azure supported Entity Framework Migrations, but the project I was moving over was a little older and I was using Migrator Dotnet.

So I created my new SQL Azure Database, and allowed my IP address to connect to the database using the Azure Management Portal.  Then I was able to connect to the database from my development workstation using SQL Management Studio.  I figured if I could connect that way, I should be able to run my Migrations from my development workstation using the connection string to my Azure database.

I setup my migration script with the proper connection string and I ran my migrations.  After a couple minutes, all my migrations were completed successfully and my Azure database was filled with all my tables and seed data.

I was excited that it worked.  I really did not want to spend time switching over to using Entity Framework Migrations.
Post a Comment