Fix migration ordering and issue with relative DEV_PREFIX paths.