Re: Stray changes detected only sometimes with revision --autogenerate

2020-09-30 Thread Daniel Krebs
Hi Mike, I adapted our setup to the new cookbook recipe and it basically fixed both problems! I don't need to maintain my patches anymore (thanks to setting `connection.dialect.default_schema_name`, this did the trick!) and the detected stray changes are also gone. I did some investigation

Re: Stray changes detected only sometimes with revision --autogenerate

2020-09-29 Thread Mike Bayer
Hi, so I added a quick recipe to the site just now just so that the "set search path" idea is documented to some extent, that is at https://alembic.sqlalchemy.org/en/latest/cookbook.html#rudimental-schema-level-multi-tenancy-for-postgresql-databases . Re: autogenerate, if you have many

Re: Stray changes detected only sometimes with revision --autogenerate

2020-09-29 Thread Daniel Krebs
Hi Mike, thanks a bunch for the quick response! This is supported by SQLAlchemy more robustly using the schema_translate_map feature, see https://docs.sqlalchemy.org/en/13/core/connections.html#schema-translating .   this feature allows schema names to render explicitly without the need to

Re: Stray changes detected only sometimes with revision --autogenerate

2020-09-29 Thread Mike Bayer
On Tue, Sep 29, 2020, at 3:35 PM, Mike Bayer wrote: > > > On Tue, Sep 29, 2020, at 9:17 AM, Daniel Krebs wrote: >> Hi, >> >> we're having rather strange problems with Alembic 1.4.2 and Postgres 12, >> detecting stray changes *sometimes* but also sometimes not. I already dug >> through the

Re: Stray changes detected only sometimes with revision --autogenerate

2020-09-29 Thread Mike Bayer
On Tue, Sep 29, 2020, at 9:17 AM, Daniel Krebs wrote: > Hi, > > we're having rather strange problems with Alembic 1.4.2 and Postgres 12, > detecting stray changes *sometimes* but also sometimes not. I already dug > through the code but I increasingly get the feel that this is rooted >

Stray changes detected only sometimes with revision --autogenerate

2020-09-29 Thread Daniel Krebs
Hi, we're having rather strange problems with Alembic 1.4.2 and Postgres 12, detecting stray changes *sometimes* but also sometimes not. I already dug through the code but I increasingly get the feel that this is rooted somewhere in the interaction between alembic and Postgres. But let me