cloudflare / cloudflare/developer-platform

🐛 BUG: Cannot back up D1 DB with virtual tables

オープン
#43 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る
product:d1
主要言語
言語のデータがありません
スター
1
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

### Which Cloudflare product(s) does this pertain to?

D1

### What version(s) of the tool(s) are you using?

3.65.1

### What version of Node are you using?

v20.14.0

### What operating system and version are you using?

Linux Mint 21.3 (Kernel 5.15.0-113-generic)

### Describe the Bug

### Observed behavior
Wrangler exits with an error message when backing up a database that contains a virtual table.

### Expected behavior
Virtual tables should be exported just like any other table, or ignored and the export should continue on tables which can be exported (with a warning). Under no circumstances should it be impossible to perform an export.

### Steps to reproduce
1. `echo "CREATE VIRTUAL TABLE location_names_fts USING fts5(name, location_id UNINDEXED, tokenize='trigram');" > pending.sql`
2. `npx wrangler d1 execute --remote --file=./pending.sql`
3. `npx wrangler d1 export --remote --output=db_backup-22-07-2024.sql`
4. See error message: ✘ [ERROR] D1 Export error: cannot export databases with Virtual Tables (fts5)

### Please provide a link to a minimal reproduction

Minimal reproduction provided in steps to reproduce

### Please provide any relevant error logs
```
⛅️ wrangler 3.65.1
-------------------

🌀 Executing on remote database ():

✘ [ERROR] D1 Export error: cannot export databases with Virtual Tables (fts5)

If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
✔ Would you like to report this error to Cloudflare? … yes
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

`wrangler d1 export` コマンドから始め、仮想テーブル `pending.sql` のセットアップとリモートエクスポートの手順を使って失敗を再現します。エクスポートが仮想テーブルをどのように処理するかを追跡し、その後 `db_backup-22-07-2024.sql` が正常に生成されることを確認します。仮想テーブルを含めるか、警告を出して続行するかのいずれかです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
node.js
領域
cli, database
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。