More DB migration bug fixes following functional testing