From: Mike Bayer Date: Thu, 26 May 2022 20:12:10 +0000 (-0400) Subject: QueryableAttribute can be used as DDL column X-Git-Tag: rel_2_0_0b1~287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=783d66de894c37fba46a12cd4c4b30910cf421c3;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git QueryableAttribute can be used as DDL column We have a lot of mappings with like ForeignKey(A.id) so this needs to be included. Change-Id: I8ac4211fb09720f093fe7f6353f365ee1d7faaae --- diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index b5faa7cbf1..bb7eda5ac2 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -136,6 +136,7 @@ class QueryableAttribute( interfaces.PropComparator[_T], roles.JoinTargetRole, roles.OnClauseRole, + roles.DDLConstraintColumnRole, sql_base.Immutable, cache_key.SlotsMemoizedHasCacheKey, util.MemoizedSlots,