Having it in the migration is both non-standard practice, and makes it practically difficult to reference in other parts of the code, like in tests (hence the # See the `0015_machinetype.py` migration for which MachineTypes are created by default comments).
The list could e.g. be moved to one of the following:
Static field(s) on the MachineType model
Fixture file(s) - or, preferably, factory classes - which is the standard practice for default model instances
This could be done after #555 has been completed, or possibly in conjunction with it
In that case, the same could be done for default InheritanceGroups and Committees
Having it in the migration is both non-standard practice, and makes it practically difficult to reference in other parts of the code, like in tests (hence the
# See the `0015_machinetype.py` migration for which MachineTypes are created by default
comments).The list could e.g. be moved to one of the following:
MachineType
modelInheritanceGroup
s andCommittee
s