Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

psycopg2.ProgrammingError: column cons.consrc does not exist

I am working on a web app where I needed to update the Postgres(12) database. 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".
like image 520
fatih Avatar asked Oct 12 '19 07:10

fatih


1 Answers

I got the same error after upgrading to Postgres v12.

I did:

pip install --upgrade sqlalchemy 

and upgrade any other dependency packages working together with sqlalchemy, for example, pip install --upgrade vdm

Hope this helps

like image 114
Mahmut ARIKAN Avatar answered Oct 21 '22 03:10

Mahmut ARIKAN