diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/postgres/operations.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/contrib/postgres/operations.py b/django/contrib/postgres/operations.py index 1ee5fbc2e2..84360febf9 100644 --- a/django/contrib/postgres/operations.py +++ b/django/contrib/postgres/operations.py @@ -237,6 +237,11 @@ class CreateCollation(CollationOperation): def migration_name_fragment(self): return "create_collation_%s" % self.name.lower() + def reduce(self, operation, app_label): + if isinstance(operation, RemoveCollation) and self.name == operation.name: + return [] + return super().reduce(operation, app_label) + class RemoveCollation(CollationOperation): """Remove a collation.""" |
