# HG changeset patch # User Kim Alvefur # Date 1689562370 -7200 # Node ID 2a9ce229efac66ead387fa54b804d6dd184d1f6f # Parent 56decf85db1da593f505e53672c9cef7a3ede8a3 mod_storage_sql: Allow higher precision timestamps in SQLite3 Since it doesn't actually do strict typing :) diff -r 56decf85db1d -r 2a9ce229efac plugins/mod_storage_sql.lua --- 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 = [[