Database Reference
In-Depth Information
The pg:reset command
The pg:reset command is very useful for recreating your database and leaving it
without data. If you try to run the pg:push command for a database that already has data,
the Heroku client will notify you with the following message:
$ heroku pg:push my_local_database
HEROKU_POSTGRESQL_[COLOR]_URL --app your-app-name
! Remote database is not empty.
! Please create a new database, or use `heroku pg:reset`
This command expects you to provide the specific URL of the database on which you'd
like to perform the pg:reset command. You can use the DATABASE_URL command for
the default database or another URL in the pattern
HEROKU_POSTGRESQL_[COLOR]_URL .
$ heroku pg:reset HEROKU_POSTGRESQL_[COLOR]_URL --app
your-app-name
! WARNING: Destructive Action
! This command will affect the app: your-app-name
! To proceed, type "your-app-name" or re-run this command
with --confirm your-app-name
This is a destructive action and Heroku client asks you to confirm the action by typing the
application name. Only after this, the pg:reset process will succeed.
> your-app-name
Resetting HEROKU_POSTGRESQL_[COLOR]_URL... done
Search WWH ::




Custom Search