mod_storage_sql: Drop archive timestamp precision pending schema update
authorKim Alvefur <zash@zash.se>
Sun, 14 Aug 2022 17:29:39 +0200
changeset 12635 9524bb7f3944
parent 12634 781772c8b6d9
child 12636 70ae68bb0aa5
mod_storage_sql: Drop archive timestamp precision pending schema update The "when" column is an INTEGER which will probably be unhappy about storing higher precision timestamps, so we keep the older behavior for now.
plugins/mod_storage_sql.lua
--- a/plugins/mod_storage_sql.lua	Sun Aug 14 17:28:31 2022 +0200
+++ b/plugins/mod_storage_sql.lua	Sun Aug 14 17:29:39 2022 +0200
@@ -321,7 +321,8 @@
 		end
 	end
 
-	when = when or os.time();
+	-- FIXME update the schema to allow precision timestamps
+	when = when and math.floor(when) or os.time();
 	with = with or "";
 	local ok, ret = engine:transaction(function()
 		local delete_sql = [[