mod_storage_sql: Allow higher precision timestamps in SQLite3
Since it doesn't actually do strict typing :)
--- a/plugins/mod_storage_sql.lua Mon Jul 17 14:57:27 2023 +0200
+++ b/plugins/mod_storage_sql.lua Mon Jul 17 04:52:50 2023 +0200
@@ -335,7 +335,11 @@
end
-- FIXME update the schema to allow precision timestamps
- when = when and math.floor(when) or os.time();
+ when = when or os.time();
+ if engine.params.driver ~= "SQLite3" then
+ -- SQLite3 doesn't enforce types :)
+ when = math.floor(when);
+ end
with = with or "";
local ok, ret = engine:transaction(function()
local delete_sql = [[