sql_flush
Return a list of the SQL statements used to flush the database.
def sql_flush(
style: Style,
connection: DatabaseWrapper,
reset_sequences: boolean = True,
allow_cascade: boolean = False
) - > list
Return a list of the SQL statements used to flush the database.
Parameters
| Name | Type | Description |
|---|---|---|
| style | Style | A terminal color scheme object used to format the generated SQL output. |
| connection | DatabaseWrapper | The database connection object providing introspection and backend-specific SQL operations. |
| reset_sequences | boolean = True | Whether to include SQL statements that reset primary key sequences to their initial values. |
| allow_cascade | boolean = False | Whether to enable cascading deletes when clearing tables with foreign key dependencies. |
Returns
| Type | Description |
|---|---|
list | A list of SQL strings required to clear all data from the database tables. |