Closed
Bug 1352744
Opened 9 years ago
Closed 9 years ago
Can't initialize Pontoon's db by running migrations via manage.py
Categories
(Webtools Graveyard :: Pontoon, defect)
Webtools Graveyard
Pontoon
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Kostic, Unassigned)
Details
Attachments
(1 file)
|
84.92 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170327113357
Steps to reproduce:
I am trying to setup my own instance of Pontoon on CentOS 7 VM by following the steps outlined at the page http://mozilla-pontoon.readthedocs.io/en/latest/dev/install.html .
I get stuck at step 6, in the installation section. I can't initialize the database by running migrations (by executing command "python manage.py migrate")due to the error visible in the attached screenshot.
If I manually apply a patch (visible at the page https://github.com/mathjazz/pontoon/commit/05db98cccbf07cad984be713a88d1187c686d21f), the migrations are runned and the database gets initialized properly.
Actual results:
An error occured, as visible in the screenshot.
Expected results:
Script manage.py should have initialized the database by running the migrations.
Comment 1•9 years ago
|
||
Hi,
Unfortunately, this issue is probably blocked by https://bugzilla.mozilla.org/show_bug.cgi?id=1342613
Comment 2•9 years ago
|
||
I wonder what's causing the 'relation "auth_group" does not exist' error in first place?
Does it mean that the 'auth' app hasn't been migrated yet?
If yes, how is this related to bug 1342613?
Comment 3•9 years ago
|
||
Do we know which migration actually fails?
I wonder if that's something where the pontoon migration depends on a migration in django.contrib.auth?
Comment 4•9 years ago
|
||
I reproduced the error with the "Deploy to Heroku" button - the build fails with the same error.
The log doesn't tell which migrations fails, but I guess it's the latest one.
It was added here:
https://github.com/mozilla/pontoon/commit/0affac36046f357cdece8554a97c87c8bbc588e2
I tried to build the version before this commit and it built successfully.
So yeah, my guess is also that the "base" app migration runs before "django.contrib.auth".
Not yet sure what to do here.
Comment 5•9 years ago
|
||
I'd argue that we need the "swappable" user model dependency that we have in https://github.com/mozilla/pontoon/commit/0affac36046f357cdece8554a97c87c8bbc588e2#diff-563d7ae80cbb46f7f62b692c79acb7f3R13 for the group model in
https://github.com/mozilla/pontoon/commit/0affac36046f357cdece8554a97c87c8bbc588e2#commitcomment-21593942
Comment 6•9 years ago
|
||
I researched this topic yesterday and I actually started moving our modifications of User model into a proxy model. I'll push the PR if that will help for migrations/problems we've saw.
Comment 7•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/pontoon
https://github.com/mozilla/pontoon/commit/d978e750198d685b519ba984d9e8331ac53092af
Fix bug 1352744. Remove models from migration (#570)
And move ContactChoceField's queryset into ProjectForm's Constructor
Updated•9 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•