-- 添加 system_config 表（已有数据库执行此脚本）
-- 用法: mysql -u weibo -p weibo_hotsign < migrate_add_system_config.sql

CREATE TABLE IF NOT EXISTS system_config (
    `key` VARCHAR(64) PRIMARY KEY,
    `value` VARCHAR(500) NOT NULL DEFAULT '',
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT IGNORE INTO system_config (`key`, `value`) VALUES
    ('webhook_url', 'https://open.feishu.cn/open-apis/bot/v2/hook/ba78bd75-baa3-4f14-990c-ae5a2b2d272a'),
    ('daily_report_hour', '23'),
    ('daily_report_minute', '30');
