In my current employer's setup, we use SQLAlchemy core and ORM, but we
use a homegrown migration system instead of alembic. When possible, we
want to write code so that it can work equally well with the old DB
schema and the new DB schema.

In this case, I am adding a column, and if the column doesn't exist, it
is possible to fake it using a property.

My current thought is to introspect the DB and see if the column exists,
and if it does not exist remove it from the table and mapped class and
add the property instead. Does this sound reasonable?

-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to