From 4e700bea5fdc9590ef0ef33d7e171fc60abdbc33 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Mon, 4 May 2026 10:05:34 +0200 Subject: [PATCH 1/2] fix: do not log expected expected D1 errors --- .changeset/eleven-parents-send.md | 9 +++++++++ packages/cloudflare/src/cli/commands/populate-cache.ts | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/eleven-parents-send.md diff --git a/.changeset/eleven-parents-send.md b/.changeset/eleven-parents-send.md new file mode 100644 index 000000000..e96d24da2 --- /dev/null +++ b/.changeset/eleven-parents-send.md @@ -0,0 +1,9 @@ +--- +"@opennextjs/cloudflare": patch +--- + +fix: do not log expected expected D1 errors + +The `populateCache` command adds columns to the D1 tag cache for SWR support. +This is required for older deployments made before those column were added. +SQLite errors when the columns exist and we should not lof those errors. diff --git a/packages/cloudflare/src/cli/commands/populate-cache.ts b/packages/cloudflare/src/cli/commands/populate-cache.ts index 2ddcffefc..b2d55f9cc 100644 --- a/packages/cloudflare/src/cli/commands/populate-cache.ts +++ b/packages/cloudflare/src/cli/commands/populate-cache.ts @@ -607,7 +607,8 @@ function populateD1TagCache( target: populateCacheOptions.target, environment: populateCacheOptions.environment, configPath: populateCacheOptions.wranglerConfigPath, - logging: "error", + // Do not log errors since the ALTER TABLE command will fail if the columns already exist. + logging: "none", } ); From a6da94863478e52a48e741649673443a2e8213c3 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Mon, 4 May 2026 10:27:38 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Victor Berchet --- .changeset/eleven-parents-send.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/eleven-parents-send.md b/.changeset/eleven-parents-send.md index e96d24da2..31b75a612 100644 --- a/.changeset/eleven-parents-send.md +++ b/.changeset/eleven-parents-send.md @@ -6,4 +6,4 @@ fix: do not log expected expected D1 errors The `populateCache` command adds columns to the D1 tag cache for SWR support. This is required for older deployments made before those column were added. -SQLite errors when the columns exist and we should not lof those errors. +SQLite errors when the columns exist and we should not log those errors.