Commit 9fcd1fa
fix(templates): added missing CLOUDFLARE_ENV in cloudflare template when optimizing database (#14064)
### 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
Co-authored-by: Ricardo Tavares <rtavares@cloudflare.com>1 parent 9d3e540 commit 9fcd1fa
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments