-- 添加缩略图路径字段到素材表（material_segments表在初始化时已有thumbnail_path）
ALTER TABLE materials ADD COLUMN thumbnail_path TEXT;

-- 添加素材使用状态字段到素材片段表
ALTER TABLE material_segments ADD COLUMN usage_count INTEGER DEFAULT 0;
ALTER TABLE material_segments ADD COLUMN is_used BOOLEAN DEFAULT 0;
ALTER TABLE material_segments ADD COLUMN last_used_at DATETIME;

-- 添加导出次数字段到模板匹配结果表
ALTER TABLE template_matching_results ADD COLUMN export_count INTEGER DEFAULT 0;
