Skip to content

Commit e1c1954

Browse files
committed
Fix old_field -> new_field
1 parent a25593b commit e1c1954

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql_server/pyodbc/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ def _alter_field(self, model, old_field, new_field, old_type, new_type,
459459
)
460460
else:
461461
self.execute(self._create_unique_sql(model, [new_field.column]))
462-
self._delete_deferred_unique_indexes_for_field(old_field)
462+
self._delete_deferred_unique_indexes_for_field(new_field)
463463
# Added an index?
464464
# constraint will no longer be used in lieu of an index. The following
465465
# lines from the truth table show all True cases; the rest are False:

0 commit comments

Comments
 (0)