Open sqlalchemy-bot opened 7 years ago
Michael Bayer (@zzzeek) wrote:
nothing is wrong, this is something that isn't supported out of the box. At the very least would rely upon https://bitbucket.org/zzzeek/sqlalchemy/issues/1803/reflect-postgresql-inherits-relationships. For autogenerate you need to write an include_object routine to ignore these columns appropriately. I'd also accept a recipe section that includes this workaround for now.
Changes by Quentin Leffray:
Changes by Michael Bayer (@zzzeek):
Changes by Michael Bayer (@zzzeek):
Migrated issue, originally created by Quentin Leffray
Running Alembic autogenerate do not detect inherited columns from a parent table, and flag them as "to-be-dropped".
The model is defined as follow:
And the migration produced by
alembic --autogenerate
: