CFSQL-1371 reconcile dumpSql changes from D1 and document how to keep them in sync#10686
CFSQL-1371 reconcile dumpSql changes from D1 and document how to keep them in sync#10686
Conversation
🦋 Changeset detectedLatest commit: 48e8471 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
|
I think that this change should actually be backported to wrangler v3 🤔
But there are functional changes here no? 🤔 |
|
(PS: sorry for reviewing the PR already, I only now noticed that it's in draft 😅) |
| " AND type IN ('index', 'trigger', 'view')", | ||
| // 'DESC' appears in the code linked above but the observed behaviour of SQLite appears otherwise | ||
| "ORDER BY type COLLATE NOCASE", | ||
| ].join(" ") |
There was a problem hiding this comment.
This is slightly sad, but D1 uses 2 spaces for indentation and workers-sdk uses tabs. This is the best way I could think of to make both autoformatters produce something that doesn't make your eyes bleed. There is no functional change here.
0610e5e to
48e8471
Compare
dario-piotrowicz
left a comment
There was a problem hiding this comment.
LGTM 🙂
(For posterity) as discussed internally we agreed with the decision not to include tests here 🙂
The backport is also not super necessary but since (after I asked... sorry about that 🙇) you already got the backport PR ready we can also proceed with that 😄
Thanks @alsuren 🫶
Fixes CFSQL-1371
Describe your change...
This adds a comment at the top of dumpSql.ts so we don't let them get out of sync again. It also adds the d1 stats tracking machinery (which remains unused in miniflare) so that there now only whitespace differences between the two files.