Re: [sqlalchemy] `Base.prepare()` doesn't backfill missing columns and relationships in AutomapBase-derived models

2020-08-18 Thread Vitaly Kruglikov
Thanks Mike! `extend_existing=True` is having the partially-specified explicit models pick up all the remaining columns. On Tuesday, August 18, 2020 at 11:29:39 AM UTC-7 Mike Bayer wrote: > your reflect() call requires extend_existing=True in this case otherwise > existing Table objects as the

Re: [sqlalchemy] `Base.prepare()` doesn't backfill missing columns and relationships in AutomapBase-derived models

2020-08-18 Thread Mike Bayer
your reflect() call requires extend_existing=True in this case otherwise existing Table objects as the one you are creating with SqaGlobalContext will not be affected. On Tue, Aug 18, 2020, at 1:59 PM, Vitaly Kruglikov wrote: > Dear all, > > I am using: > sqlalchemy==1.3.18 > psycopg2==2.8.4

[sqlalchemy] `Base.prepare()` doesn't backfill missing columns and relationships in AutomapBase-derived models

2020-08-18 Thread Vitaly Kruglikov
Dear all, I am using: sqlalchemy==1.3.18 psycopg2==2.8.4 connection url schema: "postgresql+psycopg2://..." postgres 10.x when I define an explicit AutomapBase-derived model for 'sqa_global_context' table with only the primary key, I expected that running