Re: autogenerate always generates CREATE TABLE for existing views when they are defined in code

2015-12-27 Thread Mike Bayer
I've added an issue to look into this at https://bitbucket.org/zzzeek/alembic/issues/349/models-that-refer-to-a-view-with-table-the. On 12/26/2015 06:57 PM, Jonathan Beluch wrote: > In the meantime, the standard way to control what autogenerate > considers > is using the include_obje

Re: autogenerate always generates CREATE TABLE for existing views when they are defined in code

2015-12-26 Thread Jonathan Beluch
> > In the meantime, the standard way to control what autogenerate considers > is using the include_object callable: > > > http://alembic.readthedocs.org/en/latest/api/runtime.html#alembic.runtime.environment.EnvironmentContext.configure.params.include_object > > > here, you can even call the

Re: autogenerate always generates CREATE TABLE for existing views when they are defined in code

2015-12-24 Thread Mike Bayer
On 12/24/2015 12:15 PM, Jonathan Beluch wrote: > I have a view that exists in the database and is defined in the metadata > object via a Table() construct. When I use autogenerate, alembic always > thinks that the view doesn't exist in the DB (it does) and so generates > a create table operation.

autogenerate always generates CREATE TABLE for existing views when they are defined in code

2015-12-24 Thread Jonathan Beluch
I have a view that exists in the database and is defined in the metadata object via a Table() construct. When I use autogenerate, alembic always thinks that the view doesn't exist in the DB (it does) and so generates a create table operation. I think it has to do with an asymmetry in autogenera