Alembic autogenerate ignore non mapped tables.

1,392 views
Skip to first unread message

Srikanth Bemineni

unread,
Oct 14, 2017, 11:16:18 PM10/14/17
to sqlalchemy-alembic
Hi,

When I auto generate a migration using alembic, it automatically drops some dynamically created tables which are in the DB schema. These tables are dynamically created by my application. These class don't inherit declarative base. They are added to declarative base by the application during run time , but not during migration creation. How can alembic ignore these tables.?

Srikanth B

Mike Bayer

unread,
Oct 15, 2017, 8:47:36 PM10/15/17
to sqlalchem...@googlegroups.com
check out the include_object parameter
http://alembic.zzzcomputing.com/en/latest/api/runtime.html#alembic.runtime.environment.EnvironmentContext.configure.params.include_object
which is the catchall hook for "ignore item" rules.




>
> Srikanth B
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy-alembic" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sqlalchemy-alem...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages