Migrates db