Database Schema Migration on Azure with Git Deployment Database Schema Migration on Azure with Git Deployment azure azure

Database Schema Migration on Azure with Git Deployment


You basically want to use Azure as a Continuous Integration (CI) platform and my view is that Azure by itself just isn't there yet.

A basic git based CI scenario would involve the following steps.

  1. Your src code and any database schema/data updates are pushed to a central git repository like GitHub. [Feature available]
  2. GitHub would then push the updates to Azure. [Not supported in Azure until they support GitHub hooks]
  3. Azure compiles and deploys the code. [Supported]
  4. Azure updates the database from sql files pulled from the repo (remember, this needs to be automated). [Not supported]
  5. Azure reports any error in running the database or web application. [Supported]
  6. Azure runs user provided integration tests to check more thoroughly specific functionality and reports the status of those tests to the user [Not supported].
  7. Azure allows you to roll back to a previous deployment snapshot [Partly supported. Snapshots are not based on git commits for instance].

I might be wrong on some of those points or new features might be added since I've written this. Corrections are very welcomed and I'll try to update the list accordingly.


I am not sure how much experiences you have with Windows Azure Websites, however when you are creating a Windows Azure Websites, you have ability to use SQL Azure Database or MySQL cloud database directly integrated with your Windows Azure Websites.

So if you will use SQL Azure Database then there are several ways you can migrate your DB following the link here:

Migrating Databases to Windows Azure SQL Database (formerly SQL Azure)

To manage MySQL you can use Local Web Server to do it. The way I have done is to use PHP, the MySQL Command-Line Tool (part of MySQL), and a web server set up on my local machine, and that I have enabled the PDO extension for MySQL. This way I can manager my MySQL directly from my own local machine and the details are explain at the bottom of this article:

Create a PHP-MySQL Windows Azure web site and deploy using Git.

Also the SQL part you can write in Workbench if you use MySQL and Oracle SQL Developer if you use Oracle SQL.

Finally Git Deployment allows you to deploy your any kind of application directly to Windows Azure without using VSx.