Skip to content

Commit 5d2014f

Browse files
authored
fix: do not log expected expected D1 errors (#1246)
1 parent 01babce commit 5d2014f

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.changeset/eleven-parents-send.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
fix: do not log expected expected D1 errors
6+
7+
The `populateCache` command adds columns to the D1 tag cache for SWR support.
8+
This is required for older deployments made before those column were added.
9+
SQLite errors when the columns exist and we should not log those errors.

packages/cloudflare/src/cli/commands/populate-cache.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,8 @@ function populateD1TagCache(
607607
target: populateCacheOptions.target,
608608
environment: populateCacheOptions.environment,
609609
configPath: populateCacheOptions.wranglerConfigPath,
610-
logging: "error",
610+
// Do not log errors since the ALTER TABLE command will fail if the columns already exist.
611+
logging: "none",
611612
}
612613
);
613614

0 commit comments

Comments
 (0)