From dd25033d0a038ba0abe564354b37246d3cfe9ff0 Mon Sep 17 00:00:00 2001 From: Jourdan Rodrigues <thiagojourdan@gmail.com> Date: Thu, 6 Aug 2020 20:28:26 -0300 Subject: [PATCH] :ambulance: Adjust API for `sql_flush` The `sql_flush` call used to be only positional parameters, but now it has the last 2 called as keyword-arguments, with the `sequences` renamed to `reset_sequences`. https://github.com/django/django/blob/0a306f7da668e53af2516bfad759b52d6c650b69/django/core/management/sql.py#L13 --- djongo/operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/djongo/operations.py b/djongo/operations.py index 088b52a..8dff9ee 100644 --- a/djongo/operations.py +++ b/djongo/operations.py @@ -90,7 +90,7 @@ class DatabaseOperations(BaseDatabaseOperations): converters.append(self.convert_datetimefield_value) return converters - def sql_flush(self, style, tables, sequences, allow_cascade=False): + def sql_flush(self, style, tables, reset_sequences, allow_cascade=False): # TODO: Need to implement this fully return [f'ALTER TABLE "{table}" FLUSH' for table in tables] @@ -111,4 +111,4 @@ class DatabaseOperations(BaseDatabaseOperations): return "EXTRACT('%s' FROM %s)" % (lookup_type, field_name) def date_trunc_sql(self, lookup_type, field_name): - return "DATE_TRUNC('%s', %s)" % (lookup_type, field_name) \ No newline at end of file + return "DATE_TRUNC('%s', %s)" % (lookup_type, field_name) -- GitLab