-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't make migrations using Postgres #35
Comments
When I experienced this problem with postgreSQL I found that changing the order of mentioning the apps (in settings.py) will solve the issue. But it seems creating the auth table explicitly works in some cases. Would mentioning this explicitly in the docs help? |
Hello, this issue also took quite some time for me. @arocks How did you change the app order (what before what exactly). And I solved it using the migrate auth first, but now I run into the same problem when I use "python manage.py test" but with the testdatabase. @cesarmanzo So what should I do with the testdatabase, as I do not know if that can be configured at all... (if the order of apps solves the issue, then the testdatabase would not have the issue either I suppose...): Type 'yes' if you would like to try deleting the test database 'test_my_projDB3', or 'no' to cancel: yes The above exception was the direct cause of the following exception: Traceback (most recent call last): |
Here's a quick solution I found when facing the same problem, but first @arocks Thanks!!! You rock, this is a great project start and even with this one little issue saved my tons of time getting a prototype up and running. First, the workaround: It turns out the authtools doesn't support django-1.7/1.8 migrations until the unreleased v1.3.0. So until we have that egg on pypy and can refer to it safely with migrations, we need to grab a solid commit from the github repo. I would update requirements/base.txt with the following lines:
I did this and everything works smoothly :) Hope you can roll this fix into the repo... Maybe tomorrow I can make a proper pull request. |
I noticed that if I changed the database to Postgres before doing the initial
migrate
, it would fail with the errordjango.db.utils.ProgrammingError: relation "auth_group" does not exist
After a couple of hours I found the issue. So, I would like to suggest to add to the manual a Note that says that, if using Postgres, you need to run first:
python manage.py migrate auth
and then
python manage.py migrate
This will apply first the dependencies so that the general migration can work. If you don't run it like this, it just won't work.
Regards.
The text was updated successfully, but these errors were encountered: