Skip to content

Commit fd83391

Browse files
committed
docs: add docs on data-migration-order helper migration
1 parent fbdbf30 commit fd83391

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/configuration/data.md

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
[`benefits/core/migrations/0002_sample_data.py`][data-sample]
66

7+
!!! example "Helper migration file to define data migration order"
8+
9+
[`benefits/core/migrations/0003_data_migration_order.py`][helper-migration]
10+
11+
Since our initial data migration files are assumed to start with `0002` and depend only on `0001_initial`, this migration file ensures the migration graph has a defined order (which is required for the migration to run). It looks in the `benefits/core/migrations` directory for migration files starting with `0002` and declares them in its dependencies list.
12+
713
!!! tldr "Django docs"
814

915
[How to provide initial data for models][django-load-initial-data]
@@ -66,4 +72,5 @@ bin/init.sh
6672
[django-load-initial-data]: https://docs.djangoproject.com/en/4.0/howto/initial-data/
6773
[eligibility-server]: https://docs.calitp.org/eligibility-server
6874
[data-sample]: https://github.com/cal-itp/benefits/tree/dev/benefits/core/migrations/0002_sample_data.py
75+
[helper-migration]: https://github.com/cal-itp/benefits/tree/dev/benefits/core/migrations/0003_data_migration_order.py
6976
[init]: https://github.com/cal-itp/benefits/blob/dev/bin/init.sh

0 commit comments

Comments
 (0)