Migrates database automatically. Not yet verified with all combinations of versions.