From db2d49bc8024272c565c2a0a6796f980f110841a Mon Sep 17 00:00:00 2001 From: Ivory Date: Fri, 23 Oct 2026 20:31:49 -0500 Subject: [PATCH] [D1] Add changelog for exporting databases with virtual tables --- .../2026-10-28-d1-export-virtual-tables.mdx | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/content/changelog/d1/2026-10-28-d1-export-virtual-tables.mdx diff --git a/src/content/changelog/d1/2026-10-28-d1-export-virtual-tables.mdx b/src/content/changelog/d1/2026-10-28-d1-export-virtual-tables.mdx new file mode 100644 index 00000000000..d772b40a4da --- /dev/null +++ b/src/content/changelog/d1/2026-10-28-d1-export-virtual-tables.mdx @@ -0,0 +1,29 @@ +--- +title: Export D1 databases with virtual tables +description: Export D1 databases that contain virtual tables, such as FTS5, with a SQLite CLI compatible dump. +products: + - d1 +date: 2026-10-28 +--- + +You can now export a D1 database that contains virtual tables, such as full-text search tables using SQLite's [FTS5 module](https://www.sqlite.org/fts5.html) or spatial index tables using the `R*Tree` module. Previously, export failed for any database containing virtual tables. + +To include virtual tables in the dump, set `dump_options.compatibility` to `sqlite3_cli_only` on the [D1 export API](/api/resources/d1/subresources/database/methods/export/). The same option is available as a flag on `wrangler d1 export` and in the Cloudflare CLI. + +:::note[Import is not supported] +This dump targets the SQLite CLI only. You cannot import it back into D1. Use the standard export for databases without virtual tables. +::: + +```bash +curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/d1/database/$DATABASE_ID/export" \ + --request POST \ + --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ + --json '{ + "output_format": "polling", + "dump_options": { + "compatibility": "sqlite3_cli_only" + } + }' +``` + +For more information, refer to [Export a D1 database with virtual tables](/d1/best-practices/import-export-data/#export-a-d1-database-with-virtual-tables).