Reset request id auto-increment when system reset clears the database
This commit is contained in:
parent
1ff7ce2694
commit
f32efc42c5
1 changed files with 2 additions and 1 deletions
|
|
@ -146,7 +146,8 @@ def delete_request(request_id):
|
|||
|
||||
|
||||
def reset_all_requests():
|
||||
"""Delete every row in the requests table. Does NOT delete files."""
|
||||
"""Delete every row in the requests table and reset id auto-increment."""
|
||||
db = get_db()
|
||||
db.execute('DELETE FROM requests')
|
||||
db.execute('DELETE FROM sqlite_sequence WHERE name = ?', ('requests',))
|
||||
db.commit()
|
||||
|
|
|
|||
Reference in a new issue