Add as a first buildpack in the chain. Make sure you have yarn socket and yarn migrate command in package.json.
heroku buildpacks:clearif necessaryheroku buildpacks:set https://github.com/timanovsky/subdir-heroku-buildpackheroku buildpacks:add heroku/nodejsor whatever buildpack you need for your application- Deploy your project to Heroku.
The buildpack overwrites procfile with
web: yarn socket
release: yarn migrate