From c796d9020ee37c38b9b7a80d917e792aea6573b6 Mon Sep 17 00:00:00 2001 From: Josh Howard Date: Fri, 10 Jan 2025 12:44:59 -0600 Subject: [PATCH] Document change to default D1 export to --local (#19088) --- .../partials/workers/wrangler-commands/d1.mdx | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/content/partials/workers/wrangler-commands/d1.mdx b/src/content/partials/workers/wrangler-commands/d1.mdx index 7406b5cd4edd538..6064f39e3afac0e 100644 --- a/src/content/partials/workers/wrangler-commands/d1.mdx +++ b/src/content/partials/workers/wrangler-commands/d1.mdx @@ -2,7 +2,7 @@ {} --- -import {Render, AnchorHeading, Type, MetaInfo } from "~/components"; +import { Render, AnchorHeading, Type, MetaInfo } from "~/components"; @@ -100,9 +100,11 @@ wrangler d1 export [OPTIONS] - `DATABASE_NAME` - The name of the D1 database to export. +- `--local` + - Export from a local database for use with [wrangler dev](#dev). - `--remote` - - Execute commands/files against a remote D1 database for use with [wrangler dev --remote](#dev). -- `--output` + - Export from a remote D1 database for use with [wrangler dev --remote](#dev). +- `--output` - Path to the SQL file for your export. - `--table` - The name of the table within a D1 database to export. @@ -111,7 +113,11 @@ wrangler d1 export [OPTIONS] - `--no-schema` - Controls whether export SQL file contains database schema. Note that `--no-schema=true` is not recommended due to a known wrangler limitation that intreprets the value as false. - + Restore a database to a specific point-in-time using [Time Travel](/d1/reference/time-travel/). @@ -128,7 +134,11 @@ wrangler d1 time-travel restore [OPTIONS] - `--json` - Return output as JSON rather than a table. - + Inspect the current state of a database for a specific point-in-time using [Time Travel](/d1/reference/time-travel/). @@ -221,7 +231,11 @@ wrangler d1 backup download - `--output` - The `.sqlite3` file to write to (defaults to `'..sqlite3'`). - + Create a new migration. @@ -259,7 +273,11 @@ wrangler d1 migrations list [OPTIONS] - `--preview` - Show the list of unapplied migration files on your preview D1 database (as defined by `preview_database_id` in [`wrangler.toml`](/workers/wrangler/configuration/#d1-databases)). - + Apply any unapplied migrations.