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...
Related issues
Associated revisions
Revert "debian-wheezy: add custom_user app to the SHARED_APPS setting in the multitenant settings (#7018)"
This reverts commit 3beb5841c70f8dd1ccec74c517330c27e1c01842.
History
Updated by Benjamin Dauvergne almost 8 years ago
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.
Updated by Benjamin Dauvergne almost 8 years ago
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).
Updated by Benjamin Dauvergne almost 8 years ago
- Blocked by 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 added
Updated by Benjamin Dauvergne almost 8 years ago
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
Updated by Benjamin Dauvergne almost 8 years ago
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.
Updated by Benjamin Dauvergne almost 8 years ago
- Blocked by Bug #7024: Il y a trop de chose dans SHARED_APPS added
Updated by Benjamin Dauvergne almost 8 years ago
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().
Updated by Benjamin Dauvergne almost 8 years ago
- Status changed from Nouveau to 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
Updated by Benjamin Dauvergne almost 7 years ago
- Status changed from Résolu (à déployer) to Solution déployée
debian-wheezy: add custom_user app to the SHARED_APPS setting in the multitenant settings (#7018)