Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
import type Database from 'better-sqlite3';
function run(db: Database.Database): void {
const table = db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'schedules'").get();
if (!table) return;
const columns = db.prepare('PRAGMA table_info(schedules)').all() as Array<{ name: string }>;
if (!columns.some((column) => column.name === 'model_agent_device_id')) {
db.exec('ALTER TABLE schedules ADD model_agent_device_id TEXT');
}
}
module.exports = { run };