diff --git a/.changeset/eleven-parents-send.md b/.changeset/eleven-parents-send.md new file mode 100644 index 000000000..31b75a612 --- /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 log 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", } );