Skip to content
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

Django 1.8 ProgrammingError: relation "auth_group" does not exist #32

Closed
pajooh opened this issue Apr 5, 2015 · 4 comments · Fixed by #46
Closed

Django 1.8 ProgrammingError: relation "auth_group" does not exist #32

pajooh opened this issue Apr 5, 2015 · 4 comments · Fixed by #46

Comments

@pajooh
Copy link

pajooh commented Apr 5, 2015

I've created a new db for my Django 1.8 app. doing ./manage migrate throws this error:

...
Synchronizing apps without migrations:
  Creating tables...
    Creating table authtools_user
    Running deferred SQL...
Traceback (most recent call last):
  File "./manage.py", line 12, in <module>
    execute_from_command_line(sys.argv)
  File "/home/user/.venvs/py2.7/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/home/user/.venvs/py2.7/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/user/.venvs/py2.7/local/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/user/.venvs/py2.7/local/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
    output = self.handle(*args, **options)
  File "/home/user/.venvs/py2.7/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 179, in handle
    created_models = self.sync_apps(connection, executor.loader.unmigrated_apps)
  File "/home/user/.venvs/py2.7/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 317, in sync_apps
    cursor.execute(statement)
  File "/home/user/.venvs/py2.7/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/home/user/.venvs/py2.7/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/home/user/.venvs/py2.7/local/lib/python2.7/site-packages/django/db/utils.py", line 97, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/home/user/.venvs/py2.7/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 62, in execute
    return self.cursor.execute(sql)
django.db.utils.ProgrammingError: relation "auth_group" does not exist

however, installing Django 1.7, migrating the app and then upgrading Django to 1.8 works fine.

@gavinwahl
Copy link
Member

I think we need to add new migrations to make this work. You're not allowed to have relationships between an unmigrated and a migrated app.

@rockymeza
Copy link
Contributor

@gavinwahl, we need to create the initial migration on 1.7 and then make another one on 1.8 because the EmailField default max_length changed in 1.8

@acatton acatton added this to the Django 1.8 support milestone Apr 24, 2015
@acatton acatton added the bug label Apr 24, 2015
@acatton
Copy link
Contributor

acatton commented Jul 20, 2015

#37 has been merged. Does this fix this bug?

@kivikakk
Copy link
Contributor

Fixes it for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants