Skip to content

Conversation

@rjgtav
Copy link
Contributor

@rjgtav rjgtav commented Oct 3, 2025

What?

Adds the missing $CLOUDFLARE_ENV env parameter when optimizing the D1 database after deploy.
Switched from -e to --env as -e doesn't handle it very well when $CLOUDFLARE_ENV is empty.

Why?

Running "PRAGMA optimize" tells D1/SQLite to refresh its statistics for the query planner. This is crucial whenever an index is added or removed.

How?

By adding the "--env" parameter to the wrangler d1 execute command

@paulpopus paulpopus enabled auto-merge (squash) October 3, 2025 18:15
@paulpopus paulpopus merged commit 9fcd1fa into payloadcms:main Oct 3, 2025
26 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2025

🚀 This is included in version v3.59.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants