Introduction
Using Entity Framework Database Migrations to Update a Remote SQL Azure Database
Technology

Using Entity Framework Database Migrations to Update a Remote SQL Azure Database

I have been using .NET's Entity Framework Database Migrations and SQL Azure on one of my current development projects which has been working out quite nicely for me. However, I eventually got to the point in my development where it was time to package my Azure project and deploy it to the cloud.

Before deploying my project, I needed to make sure my SQL Azure database matched what I had in SQLExpress on my local machine. To do this, I leveraged my existing Database Migrations project by adding the connection string to my SQL Azure database subscription.

First, I needed to clear out my existing migrations in the cloud (Run these commands through the Package Manager Console in Visual Studio).

Once that was finished, all I had to do was run the database migrations from the beginning to apply the most up-to-date version of my database in the cloud.

Now I'm free to deploy my Windows Azure package without fear of it blowing up when I access it for the first time.

Robert Greiner
Author

Robert Greiner

Professional optimist. Passionate about cultivating high-performing teams @ scale by integrating the timeless wisdom of the past with the marvel of today's emergent technology in a practical way.

View Comments
Next Post

Unable to update database to match the current model because there are pending changes

Previous Post

Fixing the "One of the request inputs is out of range error" in Windows Azure

Subscribe for free

Subscribe to my newsletter and get the latest posts delivered right to your inbox for free. I don't spam and your email won't be shared with third-parties.

Thanks for subscribing!

Check your inbox to confirm your subscription.

Please enter a valid email address!