Summary
There's no first-class way to make a local dev database ISO to a remote (production) instance, which is needed to test rendering/theme work against real content. The two building blocks that should combine for this each fall short:
-
emdash export-seed is local-only. It reads a local DB file (-d, --database), so it can dump a local DB → seed, but it can't pull from a remote instance. There's a login command (for content/schema HTTP APIs) but export-seed doesn't accept a --url/remote target.
-
wrangler d1 export --remote is blocked by EmDash's FTS5 tables. On Cloudflare D1 it errors:
D1 Export error: cannot export databases with Virtual Tables (fts5)
because EmDash creates _emdash_fts_* virtual tables for full-text search. The obvious "dump prod D1 to a file" path is dead on arrival.
Workaround (works, but manual and non-obvious)
wrangler d1 export --remote supports --table, so you can export every table except the FTS5 ones and reload locally:
# list tables minus _emdash_fts_*, pass each as --table, then:
wrangler d1 export <db> --remote --output prod.sql --table <t1> --table <t2> ...
wrangler d1 execute <db> --local --file prod.sql # (INSERT OR REPLACE to avoid PK clashes with a bootstrapped local DB)
FTS rebuilds locally afterward. This works, but you have to enumerate ~all tables by hand and know to exclude the virtual ones.
Request
Either (or both):
export-seed --remote / --url — let export-seed pull schema + content from a logged-in remote instance (it already has login), producing a seed the local DB can apply. This sidesteps the D1/FTS5 limitation entirely since it goes through the app, not a raw D1 dump.
- Docs — document the
--table-excluding-FTS5 recipe for wrangler d1 export --remote, since the naive command fails with a confusing error.
Environment
- emdash 0.29.x, Cloudflare D1 backend,
wrangler 4.103.
- FTS5 tables created by EmDash:
_emdash_fts_<collection> (+ _data/_idx/_docsize/_config).
Summary
There's no first-class way to make a local dev database ISO to a remote (production) instance, which is needed to test rendering/theme work against real content. The two building blocks that should combine for this each fall short:
emdash export-seedis local-only. It reads a local DB file (-d, --database), so it can dump a local DB → seed, but it can't pull from a remote instance. There's alogincommand (forcontent/schemaHTTP APIs) butexport-seeddoesn't accept a--url/remote target.wrangler d1 export --remoteis blocked by EmDash's FTS5 tables. On Cloudflare D1 it errors:because EmDash creates
_emdash_fts_*virtual tables for full-text search. The obvious "dump prod D1 to a file" path is dead on arrival.Workaround (works, but manual and non-obvious)
wrangler d1 export --remotesupports--table, so you can export every table except the FTS5 ones and reload locally:FTS rebuilds locally afterward. This works, but you have to enumerate ~all tables by hand and know to exclude the virtual ones.
Request
Either (or both):
export-seed --remote/--url— letexport-seedpull schema + content from a logged-in remote instance (it already haslogin), producing a seed the local DB can apply. This sidesteps the D1/FTS5 limitation entirely since it goes through the app, not a raw D1 dump.--table-excluding-FTS5 recipe forwrangler d1 export --remote, since the naive command fails with a confusing error.Environment
wrangler 4.103._emdash_fts_<collection>(+_data/_idx/_docsize/_config).