[Django]-Django 1.7 Migrations issue with my old project

3👍

you have a migration that depend on django.contrib.site but is the tables related are not available.
you can

  • move django.contrib.site up in the INSTALLED_APPS
  • check the attribute dependencies of your migration

Anyway I think your problem is with the default value of some field.

If you don’t find the involved application you can:

  1. disable all the apps in the INSTALLED_APPS
  2. enable the first one
  3. run makemigrations
  4. delete all migrations
  5. enable the next application
  6. run makemigrations
    … repeat step 4..6 until you get the error
👤sax

0👍

From the documentation:

If you already have pre-existing migrations created with South, then the upgrade process to use django.db.migrations is quite simple:

  • Ensure all installs are fully up-to-date with their migrations.
  • Remove ‘south’ from INSTALLED_APPS.
  • Delete all your (numbered) migration files, but not the directory or init.py – make sure you remove the .pyc files too.
  • Run python manage.py makemigrations. Django should see the empty migration directories and make new initial migrations in the new format.
    Run python manage.py migrate. Django will see that the tables for the initial migrations already exist and mark them as applied without running them.

I suspect you forgot to

find . -iname "*.pyc" | xargs rm

Leave a comment