aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-07-17 04:30:35 +0200
committerKim Alvefur <zash@zash.se>2023-07-17 04:30:35 +0200
commit1c4021b70feb60c101c39c499dda83729755aa3e (patch)
tree95d5772949fb536d7e5199c41b80dc9abfa9f9c2
parent3619de6000b340dbd71eb12849410cc9ffbbaa64 (diff)
downloadprosody-1c4021b70feb60c101c39c499dda83729755aa3e.tar.gz
prosody-1c4021b70feb60c101c39c499dda83729755aa3e.zip
mod_storage_sql: Use UUIDv7 as keys
Potentially allows sorting on those directly as they will be in increasing order.
-rw-r--r--plugins/mod_storage_sql.lua2
1 files changed, 1 insertions, 1 deletions
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);