merger: generate entity and changelog ids with uuid v7

Switch the two UUID generation sites in the merger from v4 to time-ordered
v7, and swap the uuid crate feature flag from v4 to v7 accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-12 22:11:09 -04:00
parent c8cc4cbde8
commit 25bbf2b564
2 changed files with 3 additions and 3 deletions

View File

@ -588,7 +588,7 @@ impl Merger {
.and_then(|v| v.as_str())
.unwrap_or("");
let id_val = if entity_id.is_empty() {
Value::String(uuid::Uuid::new_v4().to_string())
Value::String(uuid::Uuid::now_v7().to_string())
} else {
Value::String(entity_id.to_string())
};
@ -980,7 +980,7 @@ impl Merger {
Self::quote_literal(&old_val_obj),
Self::quote_literal(&new_val_obj),
Self::quote_literal(id_str),
Self::quote_literal(&Value::String(uuid::Uuid::new_v4().to_string())),
Self::quote_literal(&Value::String(uuid::Uuid::now_v7().to_string())),
Self::quote_literal(&Value::String(change_kind.to_string())),
Self::quote_literal(&Value::String(timestamp.to_string())),
Self::quote_literal(&Value::String(user_id.to_string()))