Project

General

Profile

Bug #7018

Migration custom_user.0001_initial doesn't work

Added by Jérôme Schneider over 4 years ago. Updated about 2 years ago.

Status:
Fermé
Priority:
Normal
Category:
-
Target version:
Start date:
22 Apr 2015
Due date:
% Done:

0%

Patch proposed:
No
Planning:
No

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

Blocked by Hobo - 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 Fermé 23 Apr 2015
Blocked by Hobo - Bug #7024: Il y a trop de chose dans SHARED_APPS Fermé 23 Apr 2015

Associated revisions

Revision 3beb5841 (diff)
Added by Benjamin Dauvergne over 4 years ago

debian-wheezy: add custom_user app to the SHARED_APPS setting in the multitenant settings (#7018)

Revision 60ea6648 (diff)
Added by Benjamin Dauvergne over 4 years ago

Revert "debian-wheezy: add custom_user app to the SHARED_APPS setting in the multitenant settings (#7018)"

This reverts commit 3beb5841c70f8dd1ccec74c517330c27e1c01842.

History

#1 Updated by Benjamin Dauvergne over 4 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.

#2 Updated by Benjamin Dauvergne over 4 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).

#3 Updated by Benjamin Dauvergne over 4 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

#4 Updated by Benjamin Dauvergne over 4 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

#5 Updated by Benjamin Dauvergne over 4 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.

#6 Updated by Benjamin Dauvergne over 4 years ago

  • Blocked by Bug #7024: Il y a trop de chose dans SHARED_APPS added

#7 Updated by Benjamin Dauvergne over 4 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().

#8 Updated by Benjamin Dauvergne over 4 years ago

  • Target version set to 2.2.0

#9 Updated by Benjamin Dauvergne over 4 years ago

  • Assignee set to Benjamin Dauvergne

#10 Updated by Benjamin Dauvergne over 4 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

#11 Updated by Benjamin Dauvergne almost 4 years ago

  • Status changed from Résolu (à déployer) to Solution déployée

#12 Updated by Benjamin Dauvergne about 2 years ago

  • Status changed from Solution déployée to Fermé

Also available in: Atom PDF