Sure, but declarative classes have a table. MyModel.__table__.info['exclude_from_autogen']=True
(you'll probably want to write a class decorator that sets this, actually.) On Wed, Nov 18, 2015, at 02:59 AM, Michal Petrucha wrote: > On Tue, Nov 17, 2015 at 11:26:41AM -0500, Jon Rosebaugh wrote: > > You can configure an include_object() function which can inspect the > > model and decide whether or not to include the model in autogenerated > > migrations: > > > > http://alembic.readthedocs.org/en/latest/api/runtime.html#alembic.runtime.environment.EnvironmentContext.configure.params.include_object > > > > Then you just need some way of marking this on the model; I recommend > > putting a value in the 'info' dict which most SQLAlchemy schema objects > > have. > > Thanks, that looks like what I need. > > A question, though -- are you referring to > http://docs.sqlalchemy.org/en/rel_0_9/core/metadata.html#sqlalchemy.schema.SchemaItem.info > here? I couldn't find any mention of that anywhere in the docs for > orm.ext.declarative. Is it supported with declarative? If so, how? > > Thanks, > Michal > > -- > 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-alembic+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > Email had 1 attachment: > + signature.asc > 1k (application/pgp-signature) -- 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-alembic+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.