mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #31477 -- Removed "using" argument from DatabaseOperations.execute_sql_flush().
This commit is contained in:
@@ -400,9 +400,12 @@ class BaseDatabaseOperations:
|
||||
"""
|
||||
raise NotImplementedError('subclasses of BaseDatabaseOperations must provide a sql_flush() method')
|
||||
|
||||
def execute_sql_flush(self, using, sql_list):
|
||||
def execute_sql_flush(self, sql_list):
|
||||
"""Execute a list of SQL statements to flush the database."""
|
||||
with transaction.atomic(using=using, savepoint=self.connection.features.can_rollback_ddl):
|
||||
with transaction.atomic(
|
||||
using=self.connection.alias,
|
||||
savepoint=self.connection.features.can_rollback_ddl,
|
||||
):
|
||||
with self.connection.cursor() as cursor:
|
||||
for sql in sql_list:
|
||||
cursor.execute(sql)
|
||||
|
||||
Reference in New Issue
Block a user