Files
memind/user-model-service/migrate.mjs
T
john 212ff3ff80 Add User Model Service and Temporal Recall for MeMind V0.1.
Introduce UMS ingest/snapshot pipeline, Context Planner with multi-source recall, runtime context injection, canonical user mapping, and session snapshot loading on auth/me.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 23:25:18 +08:00

22 lines
521 B
JavaScript

#!/usr/bin/env node
import { createUmsPool, isUmsDatabaseConfigured, runUmsSchema } from './db.mjs';
async function main() {
if (!isUmsDatabaseConfigured()) {
console.error('UMS 未配置。请设置 UMS_DATABASE_URL 或 UMS_MYSQL_*');
process.exit(1);
}
const pool = createUmsPool();
try {
await runUmsSchema(pool);
console.log('memind_user_model schema v0 migrated successfully.');
} finally {
await pool.end();
}
}
main().catch((err) => {
console.error(err);
process.exit(1);
});