heroku / heroku/cli

Support schema export, similar to "pg_dump --schema-only"

Open
#1,316 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
889
Forks
236
Avg merge
2d 10h
Merged PRs (30d)
33

Description

Do you want to request a *feature* or report a *bug*?
-----------------------------------------------------
Feature.

What is the current behavior?
-----------------------------
N/A

What is the expected behavior?
------------------------------
Expected behavior is that the schema of a heroku instance can be exported similar to the way that "pg_dump --schema-only" works right now. Since the database in use is in a private space, it's not possible to connect directly to a private-tier database without having additional IP ranges exposed (You'd need to connect directly to the database to use the `pg_dump` cli tool).

Ideally:

```
heroku pg:schema:export -o schema.sql -a my-app
```

Workaround right now is to stand up a local postgres and run heroku pg:pull and exclude table data for all tables, but that requires you to maintain the list of tables/etc.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.