Skip to content

Commit c578600

Browse files
The reset_sequences argument in sql_flush must be understood as relative to the tables passed, not absolute. (#112)
The present fix aligns the relevant code snippet with the one from the closest impl. i.e. Oracle - cf. https://github.com/django/django/blob/795da6306a048b18c0158496b0d49e8e4f197a32/django/db/backends/oracle/operations.py#L493
1 parent c677819 commit c578600

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mssql/operations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ def _sql_flush_new(self, style, tables, *, reset_sequences=False, allow_cascade=
368368
return [
369369
sequence
370370
for sequence in self.connection.introspection.sequence_list()
371+
if sequence['table'].lower() in [table.lower() for table in tables]
371372
]
372373

373374
return []

0 commit comments

Comments
 (0)