Changeset

12631:9524bb7f3944

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.
author Kim Alvefur <zash@zash.se>
date Sun, 14 Aug 2022 17:29:39 +0200
parents 12630:781772c8b6d9
children 12632:70ae68bb0aa5
files plugins/mod_storage_sql.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 = [[