Skip to content

Commit

Permalink
Clarify guidance for preventing swappable migrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles authored Apr 4, 2024
1 parent 8566e19 commit a12f7cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/backend_architecture/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ strings should have no prefix (``u`` or ``b``) and the migration should contain
``from __future__ import unicode_literals`` as an import.

For any migrations involving Foreign keys to the FacilityUser model, the migration
will automatically be generated to use a swappable dependency on settings.AUTH_USER_MODEL.
This should be changed to remove the swappable dependency, set a fixed migration dependency
and remove the AUTH_USER_MODEL setting from the settings file. FacilityUser should be used
instead.
will automatically be generated by Django to use a swappable dependency on settings.AUTH_USER_MODEL.
This should be updated by removing the swappable dependency, setting a fixed migration dependency
and replacing the reference to `settings.AUTH_USER_MODEL` with `"kolibriauth.FacilityUser"`
instead. For an example of this, see this previous pull request: https://github.com/learningequality/kolibri/pull/11984 .

We also use the upgrade functionality triggered during the CLI
initialization to copy in new copies of static files that are used in the frontend
Expand Down

0 comments on commit a12f7cd

Please sign in to comment.