Changed order of database migration steps.