mod_storage_sql: Fix tests for SQLite3

Tests does not run the code that initializes `sqlite_version`
This commit is contained in:
Kim Alvefur 2025-02-08 12:55:40 +01:00
parent d6f8c4fe18
commit c1655a181f

View file

@ -42,7 +42,7 @@ end
local function has_upsert(engine)
if engine.params.driver == "SQLite3" then
-- SQLite3 >= 3.24.0
return (engine.sqlite_version[2] or 0) >= 24;
return engine.sqlite_version and (engine.sqlite_version[2] or 0) >= 24;
elseif engine.params.driver == "PostgreSQL" then
-- PostgreSQL >= 9.5
-- Versions without support have long since reached end of life.