mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-03 16:32:15 +02:00
Change run scripts to not do migrations
This commit is contained in:
parent
209d2b31df
commit
323f8ea4e9
3 changed files with 18 additions and 13 deletions
|
@ -10,6 +10,22 @@ cf connect-to-service getgov-unstable getgov-unstable-databse
|
|||
|
||||
to get a `psql` shell on the `unstable` environment's database.
|
||||
|
||||
## Running Migrations
|
||||
|
||||
When new code changes the database schema, we need to apply Django's migrations.
|
||||
We can run these using CloudFoundry's tasks to run the `manage.py migrate`
|
||||
command in the correct environment. For the `unstable` environment, developers
|
||||
can manually run the task with
|
||||
|
||||
```shell
|
||||
cf run-task getgov-unstable --command 'python manage.py migrate' --name migrate
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
## 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