Skip to content
This repository was archived by the owner on Jan 15, 2019. It is now read-only.
This repository was archived by the owner on Jan 15, 2019. It is now read-only.

Problems migrating in django 1.5: DatabaseError: relation "auth_user" does not exist #52

@herrmendez

Description

@herrmendez

I just installed 0.2.0 via pip and when I executed the migration I got the following error message:

Running migrations for knowledge:

  • Migrating forwards to 0003_auto__add_unique_category_slug.

    knowledge:0001_initial
    FATAL ERROR - The following SQL query failed: ALTER TABLE "knowledge_question" ADD CONSTRAINT "user_id_refs_id_29c32f273c91c4b" FOREIGN KEY ("user_id") REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED;
    The error was: relation "auth_user" does not exist

Error in migration: knowledge:0001_initial
DatabaseError: relation "auth_user" does not exist

There was something funky going on there, and unfortunately I didn't have much time to dig too deep into it so I simply deleted the migrations folder and did a ./manage.py schemamigration knowledge --initial and ./manage.py migrate knowledge but I thought I should share the info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions