-- migrations/20260608000003_sync_features.sql

-- 批量同步检索配置表 (支持唯一去重机制)
CREATE TABLE IF NOT EXISTS sync_queries (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    query TEXT NOT NULL,
    source TEXT NOT NULL,
    limit_count INTEGER NOT NULL,
    last_run DATETIME DEFAULT CURRENT_TIMESTAMP,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    UNIQUE(query, source, limit_count) -- 去重约束
);
