Revert "Remove `path_hash` everywhere but the DB"

Two attempts at deploying this to production failed after an hour with a deadlock. We think the solution is to break the migration down into separate deploys.