As I play with Django more and more I kinda used to matching query does not exist
or relation “users_user” does not exist
errors. But this one is new to me:
随着我玩Django越来越多,我有点习惯匹配查询不存在或关系“users_user”不存在错误。但这个对我来说是新的:
column hello_match.URL does not exist
LINE 1: SELECT COUNT(*) FROM "hello_match" WHERE "hello_match"."URL"...
syncdb is not working here and I don't have any clue what went wrong.
syncdb在这里工作不正常,我不知道出了什么问题。
2 个解决方案
#1
0
It seems you changed the model but did not upgdated the database. Once aging you have to sync db with model.
您似乎更改了模型,但没有更新数据库。老化后,您必须将db与模型同步。
python manage.py makemigration <your app>
python manage.py migrate
#2
1
Hardcore method: remove your migration-files from the hello_match app and repeat syncdb
硬核方法:从hello_match应用程序中删除迁移文件并重复syncdb
#1
0
It seems you changed the model but did not upgdated the database. Once aging you have to sync db with model.
您似乎更改了模型,但没有更新数据库。老化后,您必须将db与模型同步。
python manage.py makemigration <your app>
python manage.py migrate
#2
1
Hardcore method: remove your migration-files from the hello_match app and repeat syncdb
硬核方法:从hello_match应用程序中删除迁移文件并重复syncdb