summaryrefslogtreecommitdiff
path: root/django/db/backends/oracle/schema.py
diff options
context:
space:
mode:
authorJordan Bae <qoentlr37@naver.com>2021-09-25 12:59:36 +0900
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-09-28 06:20:37 +0200
commitf5a3243911a5c42775cd838a3da1d0f3ac4a74ee (patch)
treeec0aea23d6f8fc96032fb2ba22e5fba58ec509e6 /django/db/backends/oracle/schema.py
parent4ffada36097ceccfd6f0d358217ac3c40d2a729c (diff)
downloaddjango-f5a3243911a5c42775cd838a3da1d0f3ac4a74ee.tar.gz
Fixed #33125 -- Avoided redundant unique constraint when converting a non-unique field to primary key on MySQL and PostgreSQL.
Diffstat (limited to 'django/db/backends/oracle/schema.py')
-rw-r--r--django/db/backends/oracle/schema.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/django/db/backends/oracle/schema.py b/django/db/backends/oracle/schema.py
index 0d1c7f5d4b..47d60ea290 100644
--- a/django/db/backends/oracle/schema.py
+++ b/django/db/backends/oracle/schema.py
@@ -174,12 +174,6 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
return False
return create_index
- def _unique_should_be_added(self, old_field, new_field):
- return (
- super()._unique_should_be_added(old_field, new_field) and
- not self._field_became_primary_key(old_field, new_field)
- )
-
def _is_identity_column(self, table_name, column_name):
with self.connection.cursor() as cursor:
cursor.execute("""