How to create or manage heroku_postgres database instance

Viewed 34875

I am developing a simple PHP application running on Heroku. I have created a CSV file and am using it as a simple database.

Now I want to create a database on Heroku, so I added a Postgres instance and its name is heroku-postgres-9f90a33a::ivory.

I want to know how I can create and manage my database instance to perform actions like creating a table.

2 Answers

With current Heroku (7.54.1), if the database is your app's primary (which it is by default), you can log in to the psql cli with:

heroku pg:psql --app <name-of-your-app>

Then continue as in the accepted answer.

Related