I have a table Activity that had a strategic_project_name column.
I removed the strategic_project_name column from the declarative definition of the Activity table and then the strategic_project_name column from the database itself.
Now I get this error message every time I try to update the one Activity record.
File "/home/phas/virtualenvs/o35/lib/python3.5/site-packages/SQLAlchemy-1.3.8-py3.5-linux-x86_64.egg/sqlalchemy/engine/default.py", line 552, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column "strategic_project_name" does not exist
[SQL: UPDATE activity SET subtitle=%(subtitle)s WHERE activity.id = %(activity_id)s]
[parameters: {'activity_id': 200, 'subtitle': 'gjh'}]
which is very odd because the SQL doesn't contain the column strategic_project_name
If I manually create a strategic_project_name column in the database activity table, it starts to work again, so it's not referring to some different table.
I can't track why does sqlalchemy think that Activity would still have a "strategic_project_name" column. I removed all the occurrencies of the word "strategic_project_name" from my whole project, but I'm still getting this error.
Do you have any advice on how to track this in the internals of sqlalchemy?