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?
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sqlalchemy/729b8817-a4e5-45ef-b31d-17772ab9016b%40googlegroups.com.