cloudflare / cloudflare/developer-platform

🐛 BUG: Cannot back up D1 DB with virtual tables

Aperta
#43 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub
product:d1
Lingua principale
Nessun dato sulla lingua
Stelle
1
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con il comando `wrangler d1 export` e riproduci l’errore utilizzando la configurazione della tabella virtuale `pending.sql` e i passaggi per l’esportazione remota. Traccia il modo in cui l’esportazione gestisce le tabelle virtuali, quindi verifica che `db_backup-22-07-2024.sql` venga prodotto correttamente, includendo la tabella virtuale oppure continuando con un avviso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
node.js
Ambito
cli, database
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.