From fe64ba38fa37088a76bcd0dbf03809dc650557a7 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 22 Jul 2023 19:16:15 +0200 Subject: [PATCH] never set db version to 0. related to #80 There is no need to initially set the database version to 0, returning 0 is enough to run the appropriate migrations. This will partially fix #80. The underlying problem is probably a temporary database lock that causes an exception in getOpt(). This still needs to be addressed. --- SQLiteDB.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SQLiteDB.php b/SQLiteDB.php index 9d8a317..f177a4f 100644 --- a/SQLiteDB.php +++ b/SQLiteDB.php @@ -30,6 +30,8 @@ class SQLiteDB /** @var \helper_plugin_sqlite */ protected $helper; + + /** * Constructor * @@ -452,7 +454,6 @@ class SQLiteDB // add the opt table - if this fails too, let the exception bubble up $sql = "CREATE TABLE IF NOT EXISTS opts (opt TEXT NOT NULL PRIMARY KEY, val NOT NULL DEFAULT '')"; $this->exec($sql); - $this->setOpt('dbversion', 0); return 0; } }