MCPcopy
hub / github.com/django/django / reduce

Method reduce

django/db/migrations/operations/models.py:1132–1140  ·  view source on GitHub ↗
(self, operation, app_label)

Source from the content-addressed store, hash-verified

1130 )
1131
1132 def reduce(self, operation, app_label):
1133 if (
1134 isinstance(operation, RenameIndex)
1135 and self.model_name_lower == operation.model_name_lower
1136 and operation.old_name
1137 and self.new_name_lower == operation.old_name_lower
1138 ):
1139 return [replace(self, new_name=operation.new_name)]
1140 return super().reduce(operation, app_label)
1141
1142
1143class AddConstraint(IndexOperation):

Callers

nothing calls this directly

Calls 2

replaceFunction · 0.90
reduceMethod · 0.45

Tested by

no test coverage detected