Skip to content
Heroku buildpack which executes a PostgreSQL script file on deployment to Heroku.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



This buildpack executes a PostgreSQL script file on deployment to Heroku.

Example use-case

You are developing a NodeJS-PostgreSQL application on Github with automatic deployment to Herokuapp whenever there is a commit to the master branch. You would like your setup.sql file to be executed each time this deployment occurs in order to reset all data (re-create and re-populate tables) in the PostgreSQL database add-on attached to your Herokuapp project.

How to add this buildpack

  1. Open your app project's Settings page.
  2. Under the Buildpacks section, add this buildpack:
  3. Under the Config Vars section, set the following config variables:
  • DATABASE_URL : postgres://[username]:[password]@[host address]:[port]/[database name]
  • SETUP_SQL : [filename].sql


More info

The DATABASE_URL for your PostgreSQL database add-on can be accessed at the Settings > View Credentials... section of your add-on administration page. Find out more here.

You can’t perform that action at this time.