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

Open
herrmendez opened this issue Jul 7, 2013 · 1 comment

Comments

@herrmendez
Copy link

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.

@SkinTeam
Copy link

Had this problem too, we use a custom user model. Resetting the migrations fixed it.

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

No branches or pull requests

2 participants