|
@@ -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)
|