mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-13 08:07:03 +02:00
Add documentation on how to access the db and roll back a migration
This commit is contained in:
parent
fa01015e9e
commit
c0b95f22f9
2 changed files with 22 additions and 0 deletions
|
@ -56,6 +56,13 @@ cf ssh getgov-ENVIRONMENT
|
|||
./manage.py dumpdata
|
||||
```
|
||||
|
||||
## Access certain table in the database
|
||||
1. `cf connect-to-service getgov-ENVIRONMENT getgov-ENVIRONMENT-database` gets you into whichever environments database you'd like
|
||||
2. `\c [table name here that starts cgaws];` connects to the [cgaws...etc] table
|
||||
3. `\dt` retrieves information about that table and displays it
|
||||
4. Make sure the table you are looking for exists. For this example, we are looking for `django_migrations`
|
||||
5. Run `SELECT * FROM django_migrations` to see everything that's in it!
|
||||
|
||||
## Dropping and re-creating the database
|
||||
|
||||
For your sandbox environment, it might be necessary to start the database over from scratch.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue