简体   繁体   English

psycopg2.ProgrammingError:列 cons.consrc 不存在

[英]psycopg2.ProgrammingError: column cons.consrc does not exist

I am working on a web app where I needed to update the Postgres(12) database.我正在开发一个需要更新 Postgres(12) 数据库的 web 应用程序。 I am using flask-migrate for the purpose.我为此目的使用烧瓶迁移。

I have tried to fix it, but it seems it is a new issue and hence I am not getting much help.我试图修复它,但它似乎是一个新问题,因此我没有得到太多帮助。 I have tried to modify the database from my terminal, that works obviously.我试图从我的终端修改数据库,这显然有效。 This is what I usually type to update my db:这是我通常输入来更新我的数据库:

flask db migrate -m ".."

This is the error message I am receiving at the terminal:这是我在终端收到的错误消息:

psycopg2.ProgrammingError: column cons.consrc does not exist
LINE 4:                 cons.consrc as src
                        ^
HINT:  Perhaps you meant to reference the column "cons.conkey" or the column "cons.conbin".

Are you using SQLAlchemy?您使用的是 SQLAlchemy 吗? And if yes, which version?如果是,哪个版本? Version 1.3.10 fixed the problem for me. 1.3.10 版为我解决了这个问题。 Hope it helps.希望能帮助到你。

I got the same error after upgrading to Postgres v12.升级到 Postgres v12 后出现同样的错误。

I did:我做了:

pip install --upgrade sqlalchemy 

and upgrade any other dependency packages working together with sqlalchemy, for example, pip install --upgrade vdm并升级与 sqlalchemy 一起使用的任何其他依赖包,例如 pip install --upgrade vdm

Hope this helps希望这可以帮助

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 psycopg2.ProgrammingError:列“ none”不存在-更新语句 - psycopg2.ProgrammingError: column “none” does not exist - Update Statement psycopg2.ProgrammingError:“您的姓名”列不存在 - psycopg2.ProgrammingError: column “your name” does not exist psycopg2.ProgrammingError:关系“匹配”不存在 - psycopg2.ProgrammingError: relation “matches” does not exist Flask:sqlalchemy.exc.ProgrammingError:(psycopg2.ProgrammingError)关系“users”不存在 - Flask : sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation “users” does not exist sqlalchemy.exc.ProgrammingError:(psycopg2.ProgrammingError)关系“故事”不存在 - sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation “story” does not exist <class 'psycopg2.ProgrammingError'> - <class 'psycopg2.ProgrammingError'> 使用自定义模型管理器不存在Django psycopg2.ProgrammingError关系 - Django psycopg2.ProgrammingError relation does not exist using custom model Manager psycopg2.ProgrammingError:没有要获取的结果 - psycopg2.ProgrammingError: no results to fetch Python 支持的 SQL 数据库返回 psycopg2.ProgrammingError: 尝试删除表中的数据时关系不存在错误? - Python backed SQL Database returning a psycopg2.ProgrammingError: relation does not exist error when attempting to delete the data within a table? psycopg2.ProgrammingError:“或”附近的语法错误 - psycopg2.ProgrammingError: syntax error at or near "OR
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM