fix migration

This commit is contained in:
おさむのひと 2025-02-23 12:26:23 +09:00
parent 517ce81ce1
commit 3e139a19ce
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ export class SystemAccounts1740121393164 {
}
const meta = await queryRunner.query(`SELECT "proxyAccountId" FROM "meta" ORDER BY "id" DESC LIMIT 1`);
if (meta[0].proxyAccountId) {
if (!meta && meta.length >= 1 && meta[0].proxyAccountId) {
await queryRunner.query(`INSERT INTO "system_account" ("id", "userId", "type") VALUES ('${meta[0].proxyAccountId}', '${meta[0].proxyAccountId}', 'proxy')`);
}
}