Postgres database error: relationship does not exist

I fix some problems with an outdated system and run into a problem that I wonder was not caught before. I am running Django 1.3 and using postgres 9.1.3 to run this application. A system is a verification system for users using the rest of the system. It uses part of the Django user interface, but basically it has its own "Users".

My problem arises when I try to give my user questions about my account (similar to how you forgot the password for the website). When I try to do this, this causes this error:

Database Error at admin/password/user

relation "password_user_answered_questions_id_s" does not exist
LINE 1: SELECT CURRVAL('"password_user_quest...
              ^

Does anyone know what might cause this error? I tried resetting db (I didn’t think that he would do something, but just wants to be sure), and also went into db using phppgadmin and found that everything else was stored correctly, except for this. He uses the ManyToMany field when assigning it so that the user can ask several questions, and the question can be used by several users.

+3
source share
2 answers

Probably the reason is that

relationship "password_user_answered_questions_id_s" does not exist

Just like the error message. Do you know how PostgreSQL handles identifiers ?

, * _ seq. ?


. :

NAMEDATALEN-1 ; , . NAMEDATALEN 64, 63. , , NAMEDATALEN src/include/pg_config_manual.h.

. , .

+2

, , . :

  • python manage.py makemigrations myappname
  • python manage.py migrate myappname
0

All Articles