First time here? Check out the FAQ!

Revision history  [back]

Here's how I managed to get past this error:

  • Run python manage.py migrate --fake to see which migrations need to take place.
  • For each migration, run python manage.py migrate appname .

That seemed to fix things; I can now do full migrations without incident.

Here's how I managed I'm now having this same bug upgrading 0.7.43 to get past this error:0.7.50. This is what I"m seeing. Any help would be appreciated.

  • Run
    python [cvxforum@cvxr ~]$ python2.7 manage.py migrate --fake--all
    Running migrations for longerusername:
    - Nothing to migrate.
     - Loading initial data for longerusername.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for askbot:
    - Nothing to migrate.
     - Loading initial data for askbot.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for django_authopenid:
    - Nothing to migrate.
     - Loading initial data for django_authopenid.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for robots:
     - Migrating forwards to 0001_initial.
     > robots:0001_initial
    FATAL ERROR - The following SQL query failed: CREATE TABLE "robots_url" ("id" serial NOT NULL PRIMARY KEY, "pattern" varchar(255) NOT NULL)
    The error was: relation "robots_url" already exists
    
    Error in migration: robots:0001_initial
    DatabaseError: relation "robots_url" already exists
     to see which migrations need to take place.
  • For each migration, run python manage.py migrate appname .

That seemed to fix things; I can now do full migrations without incident.