From eddcdb1a53646bfae450a2133887341183b143e7 Mon Sep 17 00:00:00 2001 From: wangsijie Date: Thu, 21 Nov 2024 10:00:22 +0800 Subject: [PATCH] fix(schemas): fix alter script of init account center --- .../alterations/next-1731054001-init-account-center.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/schemas/alterations/next-1731054001-init-account-center.ts b/packages/schemas/alterations/next-1731054001-init-account-center.ts index 63273b6346d..b14f33b8afb 100644 --- a/packages/schemas/alterations/next-1731054001-init-account-center.ts +++ b/packages/schemas/alterations/next-1731054001-init-account-center.ts @@ -4,13 +4,6 @@ import type { AlterationScript } from '../lib/types/alteration.js'; const alteration: AlterationScript = { up: async (pool) => { - // Delete the default account center if it exists - const { rowCount } = await pool.query(sql` - delete from account_centers where id = 'default'; - `); - - console.log(`Deleted ${rowCount} default account center`); - // Process in chunks of 1000 tenants const batchSize = 1000; // eslint-disable-next-line @silverhand/fp/no-let @@ -21,7 +14,7 @@ const alteration: AlterationScript = { // eslint-disable-next-line no-await-in-loop const tenants = await pool.any<{ id: string }>(sql` select id from tenants - order by created_at asc + order by created_at asc, id asc limit ${batchSize} offset ${offset}; `);