Project

General

Profile

Actions

Bug #7018

closed

Migration custom_user.0001_initial doesn't work

Added by Jérôme Schneider about 11 years ago. Updated over 8 years ago.

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

0%

Estimated time:
Patch proposed:
No
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...

Related issues 2 (0 open2 closed)

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_backwardsFerméBenjamin Dauvergne23 April 2015

Actions
Blocked by Hobo - Bug #7024: Il y a trop de chose dans SHARED_APPSFerméBenjamin Dauvergne23 April 2015

Actions
Actions #1

Updated by Benjamin Dauvergne about 11 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.

Actions #2

Updated by Benjamin Dauvergne about 11 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).

Actions #3

Updated by Benjamin Dauvergne about 11 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
Actions #4

Updated by Benjamin Dauvergne about 11 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

Actions #5

Updated by Benjamin Dauvergne about 11 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.

Actions #6

Updated by Benjamin Dauvergne about 11 years ago

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

Updated by Benjamin Dauvergne about 11 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().

Actions #8

Updated by Benjamin Dauvergne about 11 years ago

  • Target version set to 2.2.0
Actions #9

Updated by Benjamin Dauvergne about 11 years ago

  • Assignee set to Benjamin Dauvergne
Actions #10

Updated by Benjamin Dauvergne about 11 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

Actions #11

Updated by Benjamin Dauvergne over 10 years ago

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

Updated by Benjamin Dauvergne over 8 years ago

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

Also available in: Atom PDF