Update 1740121393164-system-accounts.js

This commit is contained in:
syuilo 2025-02-21 20:39:37 +09:00
parent 271ca3f5c9
commit f512bace2a
1 changed files with 3 additions and 1 deletions

View File

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