Django/Postgres migration failing “django.db.utils.ProgrammingError: relation ”django_site“ does not exist”

前端 未结 1 1474
我寻月下人不归
我寻月下人不归 2021-01-02 12:33

Having issue migrating a Django 1.8.1 project

Operations to perform:
  Synchronize unmigrated apps: raven_contrib_django, staticfiles, found_dash, messages,          


        
相关标签:
1条回答
  • 2021-01-02 13:03

    The problem is internal to Django. It doesn't take into account your app's dependency on django_site at the time of creating tables.

    However, you can easily circumvent the problem creating a migration for the app whose dependency on django.contrib.sites is causing the error.

    Solve this by:

    src/manage.py makemigrations allauth
    

    (Existing migrations will cause tables to be created at a later time and also perform dependency checks between migrated apps.)

    0 讨论(0)
提交回复
热议问题