fix migration ordering and models