Table of Contents |
---|
...
- Remove all references to the table by removing references to the model and the model itself
- If this change is in the edx-platform codebase, add a skip to the
test_migrations_are_in_sync
unit test.
- If this change is in the edx-platform codebase, add a skip to the
- Remove the table 's model ( with a migration).
- Remove the skip if you added one
How to delete a Django app containing tables
...
When using AWS Aurora, a nullable column can be added to existing large (100k rows+?) tables without causing downtime. However, the migration may still timeout in GoCD - so please coordinate the release with DevOps.
- Make a new field addition in model with null=True.
- Generate the model-change migrations locally.
- Create a pull request containing the model change and newly-generated migrations.
- Merge the migration pull request.
- The release process will run the migration and add the nullable column to table.
...
On AWS Aurora, indexes can be build on large tables without causing downtime, but this requires devops coordination as the migration may timeout in GoCD.
- Add the new index on model fields.
- Generate the model-change migrations locally.
- Make pull request containing the model change and newly-generated migrations.
- Merge the migration pull request.
- Release will run the migration and add the index to table.
...