From ae10146793dca0e0594c7acdee20ca3810983f39 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 25 Mar 2024 08:50:26 +0100 Subject: [PATCH] Removed unused _alter_column_collation_sql() in PostgreSQL DatabaseSchemaEditor. Unused since ae0899be0d787fbfc5f5ab2b18c5a8219d822d2b. --- django/db/backends/postgresql/schema.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/django/db/backends/postgresql/schema.py b/django/db/backends/postgresql/schema.py index 842830be3040..0c8548a5d663 100644 --- a/django/db/backends/postgresql/schema.py +++ b/django/db/backends/postgresql/schema.py @@ -255,25 +255,6 @@ def _alter_column_type_sql( model, old_field, new_field, new_type, old_collation, new_collation ) - def _alter_column_collation_sql( - self, model, new_field, new_type, new_collation, old_field - ): - sql = self.sql_alter_column_collate - # Cast when data type changed. - if using_sql := self._using_sql(new_field, old_field): - sql += using_sql - return ( - sql - % { - "column": self.quote_name(new_field.column), - "type": new_type, - "collation": ( - " " + self._collate_sql(new_collation) if new_collation else "" - ), - }, - [], - ) - def _alter_field( self, model,