-- 为meetings表添加updated_at和user_prompt字段
-- 执行日期: 2025-10-28

-- 添加updated_at字段
ALTER TABLE meetings
ADD COLUMN updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
AFTER created_at;

-- 添加user_prompt字段
ALTER TABLE meetings
ADD COLUMN user_prompt TEXT
AFTER summary;

-- 为现有记录设置updated_at为created_at的值
UPDATE meetings
SET updated_at = created_at
WHERE updated_at IS NULL;
