Bug #7018
Migration custom_user.0001_initial doesn't work
0%
Description
On multitenant mode custom_user.0001_initial failed on public schema with this error :
django.db.utils.ProgrammingError: ERREUR: la relation « custom_user_user_groups » n'existe pas LINE 1: ...alesce(max("id"), 1), max("id") IS NOT null) FROM "custom_us...
Demandes liées
Révisions associées
Revert "debian-wheezy: add custom_user app to the SHARED_APPS setting in the multitenant settings (#7018)"
This reverts commit 3beb5841c70f8dd1ccec74c517330c27e1c01842.
Historique
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
I copied schema idp_montpellier_dev_entrouvert_org content from the server of the same name and applied migrations from master on a monotenant configuration, and I could not reproduce the problem. I'll try doing it with the multitenant code to see if things are different.
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
The problem is related to the debian_config.py file for the multitenant version of authentic, custom_user app must be listed in the SHARED_APPS tuple as it replaces the Django user model.
Ticket #7023 is related and must be applied for migrations to work (it's currently applied manually on montpellier-dev).
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
- Bloqué par Bug #7023: Le monkeypatch de l'opération de migration RunPython contient une erreur dans la signature des méthodes database_forwards et database_backwards ajouté
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
The fix also requires to bump Django version to at least Django 1.7.6, but we should target 1.7.7 now and 1.8.x soon. Before migrations of foreign keys just do not work. See https://code.djangoproject.com/ticket/24447
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
Benjamin Dauvergne a écrit :
The problem is related to the debian_config.py file for the multitenant version of authentic, custom_user app must be listed in the SHARED_APPS tuple as it replaces the Django user model.
I was wrong, The propre is to remove all apps from the SHARED_APPS setting.
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
- Bloqué par Bug #7024: Il y a trop de chose dans SHARED_APPS ajouté
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
Ok I found another bug with django-tenant-schemas this time, base Django introspection for table constraints only query the public schema, the postgres introspection backend of django-tenant-schemas should also override get_contraints().
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
- Statut changé de Nouveau à Résolu (à déployer)
Fixed by many commits on migrations, but mainly:
commit b1e2c297aaece6d1b6f96e0f08328e5e52e92de0 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Thu Apr 23 16:00:03 2015 +0200 saml: explode migration into two migrations to separate data from schema migrations (bis) commit 4f5a24dac4cf7ba8782d25b0a99b0549a477c72f Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Thu Apr 23 13:16:04 2015 +0200 saml: explode migration into two migrations to separate data from schema migrations
Mis à jour par Benjamin Dauvergne il y a environ 8 ans
- Statut changé de Résolu (à déployer) à Solution déployée
Mis à jour par Benjamin Dauvergne il y a plus de 6 ans
- Statut changé de Solution déployée à Fermé
debian-wheezy: add custom_user app to the SHARED_APPS setting in the multitenant settings (#7018)