diff --git a/lib/src/sql/uuid.rs b/lib/src/sql/uuid.rs index 9d4e0b82..2456c034 100644 --- a/lib/src/sql/uuid.rs +++ b/lib/src/sql/uuid.rs @@ -49,8 +49,16 @@ impl Deref for Uuid { impl Uuid { /// Generate a new V4 UUID + #[cfg(uuid_unstable)] pub fn new() -> Self { - Self(uuid::Uuid::new_v4()) + #[cfg(uuid_unstable)] + { + Self(uuid::Uuid::now_v7()) + } + #[cfg(not(uuid_unstable))] + { + Self(uuid::Uuid::new_v4()) + } } /// Generate a new V4 UUID pub fn new_v4() -> Self {