Projet

Général

Profil

Bug #7018

Migration custom_user.0001_initial doesn't work

Ajouté par Jérôme Schneider il y a presque 9 ans. Mis à jour il y a plus de 6 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
Début:
22 avril 2015
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:

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

Bloqué par 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_backwardsFermé23 avril 2015

Actions
Bloqué par Hobo - Bug #7024: Il y a trop de chose dans SHARED_APPSFermé23 avril 2015

Actions

Révisions associées

Révision 3beb5841 (diff)
Ajouté par Benjamin Dauvergne il y a presque 9 ans

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

Révision 60ea6648 (diff)
Ajouté par Benjamin Dauvergne il y a presque 9 ans

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

This reverts commit 3beb5841c70f8dd1ccec74c517330c27e1c01842.

Historique

#1

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.

#2

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).

#3

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é
#4

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

#5

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.

#6

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é
#7

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().

#8

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

  • Version cible mis à 2.2.0
#9

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

  • Assigné à mis à Benjamin Dauvergne
#10

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

#11

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

  • Statut changé de Résolu (à déployer) à Solution déployée
#12

Mis à jour par Benjamin Dauvergne il y a plus de 6 ans

  • Statut changé de Solution déployée à Fermé

Formats disponibles : Atom PDF