summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/schema.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index 565537109..bbf78e6a1 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -2327,6 +2327,12 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause[_T]):
new_onupdate = self.onupdate._copy()
new_onupdate._set_parent(other)
+ if self.index and not other.index:
+ other.index = True
+
+ if self.unique and not other.unique:
+ other.unique = True
+
for const in self.constraints:
if not const._type_bound:
new_const = const._copy()