From e398595734211ef04dbc4eda89c71fad54ce0b31 Mon Sep 17 00:00:00 2001 From: Accusys Date: Mon, 5 Oct 2026 04:17:54 +0800 Subject: [PATCH] fix: revert file_uuid to simple format (32 chars) **Problem**: - Changed to hyphenated format (36 chars) - videos.file_uuid is varchar(32) - Caused regression: 'value too long for type' **Fix**: - Reverted to simple().to_string() (32 chars) - Schema convention: ~10 tables use varchar(32) - Hyphenated format is for command_id, not file_uuid **Kept**: - FFPROBE_PATH environment variable (verified working) **Reference**: M4 analysis of schema constraints --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 542931de..61685612 100644 --- a/src/main.rs +++ b/src/main.rs @@ -165,8 +165,8 @@ async fn handle_register(path: &str) -> Result<()> { anyhow::bail!("File not found: {}", path); } - // 產生 file_uuid (Uuid::new_v4(),標準格式帶連字號) - let file_uuid = Uuid::new_v4().to_string(); + // 產生 file_uuid (Uuid::new_v4(),simple format,32 chars,符合 schema varchar(32)) + let file_uuid = Uuid::new_v4().simple().to_string(); println!("Generated UUID: {}", file_uuid); // ffprobe 提取 metadata