Closed Bug 1352744 Opened 3 years ago Closed 3 years ago

Can't initialize Pontoon's db by running migrations via manage.py

Categories

(Webtools :: Pontoon, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Kostic, Unassigned)

Details

Attachments

(1 file)

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.
Hi,
Unfortunately, this issue is probably blocked by https://bugzilla.mozilla.org/show_bug.cgi?id=1342613
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?
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?
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.
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.
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
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.