SQLAlchemy weekly dev meetings: https://docs.google.com/document/d/1WuzZwV_aIV_ltDR3cJ-bXxXMZ9zCfr5pFSXZGZOSSQw/edit?usp=sharing
sqlalchemy-bot on master
Add async template to Alembic … (compare)
sqlalchemy-bot on master
Add missing colon before code b… (compare)
sqlalchemy-bot on master
document declarative base made … Merge "document declarative bas… (compare)
@CaselIT with that kind of thing we look at the attributes and if an attribute is not set, we dont comapre it to the reflected one
I'm looking again at this. I'm not sure if it works in every case: sa you have modified some value and set it again to the default, this logic would not pick it up
ok this works
def _default_identity(self, autogen_context, col_type):
if self._reflected_identity_default is not None:
return self._reflected_identity_default
nested = autogen_context.connection.begin_nested()
try:
name = "alembic_temp_table_%s" % id(self)
meta = MetaData()
Table(name, meta, Column("c", col_type, sqla_compat.Identity()))
meta.create_all(autogen_context.connection)
meta2 = MetaData()
table2 = Table(name, meta2)
sqla_compat._reflect_table(autogen_context.inspector, table2, None)
self._reflected_identity_default = table2.c.c.identity
self._reflected_identity_default.column = None
return self._reflected_identity_default
finally:
nested.rollback()
but is very ugly
@zzzeek thoughts