From 1c4021b70feb60c101c39c499dda83729755aa3e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 17 Jul 2023 04:30:35 +0200 Subject: mod_storage_sql: Use UUIDv7 as keys Potentially allows sorting on those directly as they will be in increasing order. --- plugins/mod_storage_sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_storage_sql.lua') diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index f5569f7c..3f606160 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -366,7 +366,7 @@ function archive_store:append(username, key, value, when, with) item_count = item_count - result:affected(); end else - key = uuid.generate(); + key = uuid.v7(); end local t, encoded_value = assert(serialize(value)); engine:insert(insert_sql, host, user or "", store, when, with, key, t, encoded_value); -- cgit v1.2.3