From f512bace2a91b4150996c099fee4bcd1bb938a0e Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 21 Feb 2025 20:39:37 +0900 Subject: [PATCH] Update 1740121393164-system-accounts.js --- packages/backend/migration/1740121393164-system-accounts.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend/migration/1740121393164-system-accounts.js b/packages/backend/migration/1740121393164-system-accounts.js index 25fe645860..249387d82d 100644 --- a/packages/backend/migration/1740121393164-system-accounts.js +++ b/packages/backend/migration/1740121393164-system-accounts.js @@ -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) {