mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-28 16:29:54 +02:00
Add user fixtures
This commit is contained in:
parent
72e92c9b54
commit
3e4279ace4
5 changed files with 98 additions and 2 deletions
|
@ -21,11 +21,27 @@ can manually run the task with
|
|||
cf run-task getgov-unstable --command 'python manage.py migrate' --name migrate
|
||||
```
|
||||
|
||||
Optionally, load data from fixtures as well
|
||||
|
||||
```shell
|
||||
cf run-task getgov-unstable --wait --command 'python manage.py loaddata registrar/fixtures/*' --name loaddata
|
||||
```
|
||||
|
||||
For the `staging` environment, developers don't have credentials so we need to
|
||||
run that command using Github Actions. Go to
|
||||
<https://github.com/cisagov/getgov/actions/workflows/migrate.yaml> and select
|
||||
the "Run workflow" button, making sure that `staging` is selected.
|
||||
|
||||
## Getting data for fixtures
|
||||
|
||||
To run the `dumpdata` command, you'll need to ssh to a running container. `cf run-task` is useless for this, as you will not be able to see the output.
|
||||
|
||||
```shell
|
||||
cf ssh getgov-unstable
|
||||
/tmp/lifecycle/shell # this configures your environment
|
||||
./manage.py dumpdata
|
||||
```
|
||||
|
||||
## Dropping and re-creating the database
|
||||
|
||||
For `unstable`, it might be necessary to start the database over from scratch.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue