migrates db structure