From 22b3768f3f71a46df732700db1418daff43f0237 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 11:09:53 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Optimize=20undo=20column=20drop=20b?= =?UTF-8?q?y=20using=20Promise.all=20for=20ADD=20COLUMN=20operations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/engine/wasm/WasmDatabaseEngine.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/engine/wasm/WasmDatabaseEngine.ts b/src/core/engine/wasm/WasmDatabaseEngine.ts index 5590505..280a24e 100644 --- a/src/core/engine/wasm/WasmDatabaseEngine.ts +++ b/src/core/engine/wasm/WasmDatabaseEngine.ts @@ -272,9 +272,9 @@ export class WasmDatabaseEngine implements DatabaseOperations { if (deletedColumns) { await this.executeQuery('BEGIN TRANSACTION'); try { - for (const col of deletedColumns) { - await this.addColumn(targetTable, col.name, col.type); - } + await Promise.all( + deletedColumns.map(col => this.addColumn(targetTable, col.name, col.type)) + ); // Optimize restoration by grouping rows that have identical column sets // This is done effectively by doing one UPDATE per row for all restored columns