fix: schema field corrections for AiAnalysisJob + User
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 47s
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 47s
- User INSERT: add updatedAt=NOW() (NOT NULL, no default) - AiAnalysisJob: retryCount→progress (column doesn't exist) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
cc7a6842ed
commit
533b525496
@ -172,7 +172,7 @@ export async function dbClose(): Promise<void> {
|
||||
}
|
||||
|
||||
export async function setupFixtures(dbUrl: string, userId: string, kbId: string, kiId: string, sessionId: string): Promise<void> {
|
||||
await dbExec(dbUrl, `INSERT IGNORE INTO User (id, email, nickname, role, status) VALUES (?, ?, ?, ?, ?)`,
|
||||
await dbExec(dbUrl, `INSERT IGNORE INTO User (id, email, nickname, role, status, updatedAt) VALUES (?, ?, ?, ?, ?, NOW())`,
|
||||
[userId, `test-${Date.now()}@zhixi.app`, 'Integration Test', 'USER', 'active']);
|
||||
await dbExec(dbUrl, `INSERT IGNORE INTO KnowledgeBase (id, userId, title) VALUES (?, ?, ?)`,
|
||||
[kbId, userId, 'Test KB']);
|
||||
|
||||
@ -233,8 +233,8 @@ describe('M-AI-01-09 真实集成测试', () => {
|
||||
await new Promise(r => setTimeout(r, 10_000));
|
||||
|
||||
const jobRows = await dbQuery(DB_URL,
|
||||
'SELECT status, retryCount FROM AiAnalysisJob WHERE id = ?', ['ar-500-test']);
|
||||
console.log(` Job status: ${(jobRows[0] as any)?.status}, retries: ${(jobRows[0] as any)?.retryCount}`);
|
||||
'SELECT status, progress FROM AiAnalysisJob WHERE id = ?', ['ar-500-test']);
|
||||
console.log(` Job status: ${(jobRows[0] as any)?.status}, retries: ${(jobRows[0] as any)?.progress}`);
|
||||
|
||||
mockAI.setNormal();
|
||||
}, 15_000);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user