Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
docs(migrations): Update is_dangerous -> is_post_deployment (#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
isabellaenriquez authored Jun 14, 2024
1 parent b527ace commit de1d917
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/docs/database-migrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ generally prefer that, since it averages the load out over a longer period of ti
We prefer to create indexes on large existing tables with `CREATE INDEX CONCURRENTLY`. Our migration framework will do this automatically when creating
a new index. Note that when `CONCURRENTLY` is used we can't run the migration in a transaction, so it's important to use `atomic = False` to run these.

When adding indexes to large tables you should use a `is_dangerous` migration as creating the index could take longer than the migration statement timeout of 5s.
When adding indexes to large tables you should use a `is_post_deployment` migration as creating the index could take longer than the migration statement timeout of 5s.

### Deleting columns

Expand Down Expand Up @@ -433,7 +433,7 @@ Deployment migrations are run in each region and tenant before code is deployed.
* Removing columns and tables - as long as you follow the processes outlined
above.

### Post-deploy migrations (is_dangerous)
### Post-deploy migrations (`is_post_deployment`)

Post-deploy migrations are run manually by engineers **after** a migration has been deployed **to all** regions. During deployment, post-deploy migrations are marked as complete (faked) with django's fake migration behavior. When a post-deploy migration is run, it is run against all regions and tenants. Post-deploy migrations are triggered manually by engineers.

Expand Down Expand Up @@ -468,6 +468,8 @@ Then click `Environment Variables` and fill in a value for `django_app` and `dja

![post-deploy migration variables](/post-deploy-pipeline-variables.png)

Finally, click the `Trigger Pipeline` button.

### Cancelling a post-deploy migration

Just cancel the GoCD stage.
Expand Down

0 comments on commit de1d917

Please sign in to comment.