From 988b10e4b748261e8ac051dc17efdc165f39696a Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 20 Oct 2022 07:22:48 +0200 Subject: [PATCH] Add also an index to the requests table --- lib/db.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/db.py b/lib/db.py index 2d2b407..53d5d3a 100644 --- a/lib/db.py +++ b/lib/db.py @@ -147,9 +147,14 @@ class DB: "UPDATE scheme SET version=10", ) schemes[11] = ( - "create index request_number_idx on revisions (request_number);", + "create index request_number_idx on revisions (request_number)", "UPDATE scheme SET version=11", ) + schemes[12] = ( + "create index request_number_idx2 on requests(number)", + "UPDATE scheme SET version=12", + ) + schema_version = self.schema_version() if (schema_version + 1) not in schemes: return