Fix migration issue with Microsoft Azure's SQL database

The Microsoft Azure's SQL database doesn't allow a datetime column with a index be altered directly, so we have to first delete the indexes and then re-create them to workaround.