-
Notifications
You must be signed in to change notification settings - Fork 2
Addressing breaking change migrations
Laura Beaufort edited this page Dec 17, 2024
·
5 revisions
Reference https://github.com/3YOURMIND/django-migration-linter/blob/main/docs/incompatibilities.md for information on remediating errors.
Inside docker: API container, exec tab:
python manage.py makemigrations
- Mark field as deprecated (see django-deprecate-fields docs)
- Generate migration
- Enter follow-up issue for future sprint to remove the field. This migration will need to be ignored by the linter. Example: https://github.com/fecgov/fecfile-web-api/pull/1224/commits/f151ecf4cd1125460a6b3709e694d6d3603464a4
- Confirm with Tech lead on this choice
- See https://github.com/3YOURMIND/django-migration-linter/blob/main/docs/usage.md#ignoring-migrations
- Example: https://github.com/fecgov/fecfile-web-api/pull/1224/commits/f151ecf4cd1125460a6b3709e694d6d3603464a4
https://docs.djangoproject.com/en/5.1/topics/migrations/#reversing-migrations