Skip to content

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

Robert Greiner
Robert Greiner
1 min read

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.

Please consider subscribing, it's free.
Technology

Robert Greiner Twitter

Professional optimist. I write a weekly newsletter for humans at the intersection of business, technology, leadership, and career growth.


Related Posts

Members Public

Artist for a Day

The future of creative output is multiplied by AI.

Artist for a Day
Members Public

The Auto Industry's Cloud Awakening

Auto manufacturers are behind the cloud adoption curve but are well-positioned to unlock the future of mobility by building foundational capabilities across six key areas.

The Auto Industry's Cloud Awakening
Members Public

Off Topic Thursday: Apple Keynote Event Reflections

Igor and Robert nerd out on the recent Apple Keynote Event from October 13th 2020 and share their reflections about exceptional production value, new products, and Apple’s evolution as an organization.