From 0d1218896f3dcd9a37d44c123d936e5fe8cea416 Mon Sep 17 00:00:00 2001 From: Anderson Resende Date: Wed, 27 Jul 2016 08:34:44 -0300 Subject: [PATCH] Fixed #26950 -- Removed obsolete DatabaseOperations SQL methods. Unused as of 2b039d966f6e61a5ffb5ffac25aa198f9043de3d. --- django/db/backends/base/operations.py | 13 ------------- django/db/backends/mysql/operations.py | 3 --- django/db/backends/oracle/operations.py | 3 --- django/db/backends/sqlite3/operations.py | 3 --- 4 files changed, 22 deletions(-) diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py index bf9af0149a..4e5814e58f 100644 --- a/django/db/backends/base/operations.py +++ b/django/db/backends/base/operations.py @@ -152,19 +152,6 @@ class BaseDatabaseOperations(object): else: return 'DISTINCT' - def drop_foreignkey_sql(self): - """ - Returns the SQL command that drops a foreign key. - """ - return "DROP CONSTRAINT" - - def drop_sequence_sql(self, table): - """ - Returns any SQL necessary to drop the sequence for the given table. - Returns None if no SQL is necessary. - """ - return None - def fetch_returned_insert_id(self, cursor): """ Given a cursor object that has just performed an INSERT...RETURNING diff --git a/django/db/backends/mysql/operations.py b/django/db/backends/mysql/operations.py index f0fd8314ae..659ee2e2ce 100644 --- a/django/db/backends/mysql/operations.py +++ b/django/db/backends/mysql/operations.py @@ -97,9 +97,6 @@ class DatabaseOperations(BaseDatabaseOperations): else: return 'INTERVAL FLOOR(%s / 1000000) SECOND' % sql - def drop_foreignkey_sql(self): - return "DROP FOREIGN KEY" - def force_no_ordering(self): """ "ORDER BY NULL" prevents MySQL from implicitly ordering by grouped diff --git a/django/db/backends/oracle/operations.py b/django/db/backends/oracle/operations.py index 3761ed0df1..3ea45cb3bf 100644 --- a/django/db/backends/oracle/operations.py +++ b/django/db/backends/oracle/operations.py @@ -241,9 +241,6 @@ WHEN (new.%(col_name)s IS NULL) def deferrable_sql(self): return " DEFERRABLE INITIALLY DEFERRED" - def drop_sequence_sql(self, table): - return "DROP SEQUENCE %s;" % self.quote_name(self._get_sequence_name(table)) - def fetch_returned_insert_id(self, cursor): return int(cursor._insert_id_var.getvalue()) diff --git a/django/db/backends/sqlite3/operations.py b/django/db/backends/sqlite3/operations.py index bf3002b79b..65847bd5ef 100644 --- a/django/db/backends/sqlite3/operations.py +++ b/django/db/backends/sqlite3/operations.py @@ -108,9 +108,6 @@ class DatabaseOperations(BaseDatabaseOperations): # cause a collision with a field name). return "django_time_extract('%s', %s)" % (lookup_type.lower(), field_name) - def drop_foreignkey_sql(self): - return "" - def pk_default_value(self): return "NULL"