From ed5c39b71f2dbf72d34a00ade7083580bb1768e5 Mon Sep 17 00:00:00 2001
From: Kevin Morris <kevr@0cost.org>
Date: Sun, 31 Oct 2021 21:14:37 -0700
Subject: [PATCH] fix(mkpkglists): only check against cache if we're using
 mysql

MySQL InnoDB offers the AUTO_INCREMENT column inside of
information_schema.tables, but SQLite does not.

For production, we always use MySQL.

Signed-off-by: Kevin Morris <kevr@0cost.org>
---
 aurweb/scripts/mkpkglists.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/aurweb/scripts/mkpkglists.py b/aurweb/scripts/mkpkglists.py
index 91a91ec1c..9adbdbf26 100755
--- a/aurweb/scripts/mkpkglists.py
+++ b/aurweb/scripts/mkpkglists.py
@@ -15,6 +15,9 @@ userfile = aurweb.config.get('mkpkglists', 'userfile')
 
 
 def should_update(tablename: str) -> int:
+    if aurweb.config.get("database", "backend") != "mysql":
+        return True
+
     conn = aurweb.db.Connection()
 
     db_name = aurweb.config.get("database", "name")
-- 
GitLab