]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
QueryableAttribute can be used as DDL column
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 26 May 2022 20:12:10 +0000 (16:12 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 26 May 2022 20:12:10 +0000 (16:12 -0400)
We have a lot of mappings with like ForeignKey(A.id)
so this needs to be included.

Change-Id: I8ac4211fb09720f093fe7f6353f365ee1d7faaae

lib/sqlalchemy/orm/attributes.py

index b5faa7cbf13cddb4f7142adf2b89a735ac3eedcb..bb7eda5ac2274acfa48696fb74a03061186767ae 100644 (file)
@@ -136,6 +136,7 @@ class QueryableAttribute(
     interfaces.PropComparator[_T],
     roles.JoinTargetRole,
     roles.OnClauseRole,
+    roles.DDLConstraintColumnRole,
     sql_base.Immutable,
     cache_key.SlotsMemoizedHasCacheKey,
     util.MemoizedSlots,