Re: Create materialized view with reflected metadata

2014-10-05 Thread Stefan Urbanek
Thank you Michael, the argument "autoload_with=op.get_bind()" was what I missed. I apologize for asking about something that was in the docs, Stefan > On 02 Oct 2014, at 18:15, Michael Bayer wrote: > > > On Oct 2, 2014, at 11:41 AM, Stefan Urbanek wrote: > &

Re: Create materialized view with reflected metadata

2014-10-02 Thread Stefan Urbanek
ipes/Views > > > On Sep 30, 2014, at 11:03 AM, Stefan Urbanek > wrote: > > I want to construct SELECT from the underlying table(s) to create the view > during the migration. The materialized VIEW is the target object to be > created by the migration. > > Stefan &

Re: Create materialized view with reflected metadata

2014-09-30 Thread Stefan Urbanek
released yet: > http://docs.sqlalchemy.org/en/latest/changelog/migration_10.html#postgresql-dialect-reflects-materialized-views-foreign-tables > > > > > > > On Sep 23, 2014, at 11:01 AM, Stefan Urbanek > wrote: > > Hi, > > We are trying to create a materialized view (Postg

Create materialized view with reflected metadata

2014-09-23 Thread Stefan Urbanek
Hi, We are trying to create a materialized view (PostgreSQL). We have this simple statement compiler: class CreateMaterializedView(Executable, ClauseElement): def __init__(self, name, select): self.name = name self.select = select @compiles(CreateMaterializedView) def visit_

Implicit schema name from MetaData

2014-06-11 Thread Stefan Urbanek
Hi, I'm trying to create tables using alembic with custom engine/metadata objects, already configured by our other library. I want all the tables to default to one schema – schema specified in the metadata. I have the original code: context.configure( connection=connection,