| ... | ... | @@ -25,11 +25,7 @@ If you want to use DjangoLDP-Account, but you don't need to understand its inter |
|
|
|
|
|
|
|
In Django, migrating the user model can be a delicate task. From the [Django documentation](https://docs.djangoproject.com/en/1.11/topics/auth/customizing/#changing-to-a-custom-user-model-mid-project):
|
|
|
|
|
|
|
|
> Changing AUTH_USER_MODEL after you’ve created database tables is significantly more difficult since it affects foreign keys and many-to-many relationships, for example. Due to limitations of Django’s dynamic dependency feature for swappable models, the model referenced by AUTH_USER_MODEL must be created in the first migration of its app (usually called 0001_initial); otherwise, you’ll have dependency issues.
|
|
|
|
|
|
|
|
You have to be **very** careful when migrating this without losing users or breaking foreign keys
|
|
|
|
|
|
|
|
If you have issues with the migration, for example when running `sib install` you have an `InconsistentMigrationHistory` exception, please refer to [this helper](helpers/migrating user model)
|
|
|
|
> Changing AUTH_USER_MODEL after you’ve created database tables is significantly more difficult since it affects foreign keys and many-to-many relationships, for example. Due to limitations of Django’s dynamic dependency feature for swappable models, the model referenced by AUTH_USER_MODEL must be created in the first migration of its app (usually called 0001_initial); otherwise, you’ll have dependency issues
|
|
|
|
|
|
|
|
# How It Works
|
|
|
|
|
| ... | ... | |
| ... | ... | |