Skip to content

How to run a local SQL script on the hosted PostgreSQL server

Andrew edited this page Nov 24, 2018 · 1 revision

Running local SQL files

  1. cd to the directory on your machine with the SQL file

  2. Open a terminal window

  3. Use: heroku pg:psql --app YOUR_APP_NAME_HERE < filename.sql

Based on: https://stackoverflow.com/questions/20508898/how-can-i-import-a-sql-file-into-my-heroku-postgres-database

Clone this wiki locally