django-knowledge
django-knowledge copied to clipboard
Problems migrating in django 1.5: DatabaseError: relation "auth_user" does not exist
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.
Had this problem too, we use a custom user model. Resetting the migrations fixed it.