(self, operation, app_label)
| 939 | return "%s_%s" % (self.model_name_lower, self.index.name.lower()) |
| 940 | |
| 941 | def reduce(self, operation, app_label): |
| 942 | if isinstance(operation, RemoveIndex) and self.index.name == operation.name: |
| 943 | return [] |
| 944 | if isinstance(operation, RenameIndex) and self.index.name == operation.old_name: |
| 945 | index = copy(self.index) |
| 946 | index.name = operation.new_name |
| 947 | return [replace(self, index=index)] |
| 948 | return super().reduce(operation, app_label) |
| 949 | |
| 950 | |
| 951 | class RemoveIndex(IndexOperation): |