Re: Select a subset of declarative classes to migrate

2015-11-18 Thread Michal Petrucha
On Wed, Nov 18, 2015 at 08:07:09AM -0500, Jon Rosebaugh wrote: > 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.) Oh, of course. Thanks a lot for the help! Cheers

Re: Select a subset of declarative classes to migrate

2015-11-18 Thread Jon Rosebaugh
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: >

Re: Select a subset of declarative classes to migrate

2015-11-18 Thread Michal Petrucha
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.

Re: Select a subset of declarative classes to migrate

2015-11-17 Thread Jon Rosebaugh
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

Select a subset of declarative classes to migrate

2015-11-17 Thread Michal Petrucha
Hi everyone, In short, is it possible to use migrations for some declarative classes, but not others? A bit more background: Certain parts of our project are relatively stable, and we want to use a migration tool for those. However, there are also some components that are highly experimental prot