Skip to content

Commit c796d90

Browse files
authored
Document change to default D1 export to --local (cloudflare#19088)
1 parent 3f37f04 commit c796d90

File tree

1 file changed

+25
-7
lines changed
  • src/content/partials/workers/wrangler-commands

1 file changed

+25
-7
lines changed

src/content/partials/workers/wrangler-commands/d1.mdx

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{}
33
---
44

5-
import {Render, AnchorHeading, Type, MetaInfo } from "~/components";
5+
import { Render, AnchorHeading, Type, MetaInfo } from "~/components";
66

77
<AnchorHeading title="`create`" slug="d1-create" depth={3} />
88

@@ -100,9 +100,11 @@ wrangler d1 export <DATABASE_NAME> [OPTIONS]
100100

101101
- `DATABASE_NAME` <Type text="string" /> <MetaInfo text="required" />
102102
- The name of the D1 database to export.
103+
- `--local` <Type text="boolean" /> <MetaInfo text="(default: true) optional" />
104+
- Export from a local database for use with [wrangler dev](#dev).
103105
- `--remote` <Type text="boolean" /> <MetaInfo text="(default: false) optional" />
104-
- Execute commands/files against a remote D1 database for use with [wrangler dev --remote](#dev).
105-
- `--output` <Type text="string" /> <MetaInfo text="optional" />
106+
- Export from a remote D1 database for use with [wrangler dev --remote](#dev).
107+
- `--output` <Type text="string" /> <MetaInfo text="required" />
106108
- Path to the SQL file for your export.
107109
- `--table` <Type text="string" /> <MetaInfo text="optional" />
108110
- The name of the table within a D1 database to export.
@@ -111,7 +113,11 @@ wrangler d1 export <DATABASE_NAME> [OPTIONS]
111113
- `--no-schema` <Type text="boolean" /> <MetaInfo text="(default: false) optional" />
112114
- 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.
113115

114-
<AnchorHeading title="`time-travel restore`" slug="d1-time-travel-restore" depth={3} />
116+
<AnchorHeading
117+
title="`time-travel restore`"
118+
slug="d1-time-travel-restore"
119+
depth={3}
120+
/>
115121

116122
Restore a database to a specific point-in-time using [Time Travel](/d1/reference/time-travel/).
117123

@@ -128,7 +134,11 @@ wrangler d1 time-travel restore <DATABASE_NAME> [OPTIONS]
128134
- `--json` <Type text="boolean" /> <MetaInfo text="optional" />
129135
- Return output as JSON rather than a table.
130136

131-
<AnchorHeading title="`time-travel info`" slug="d1-time-travel-info" depth={3} />
137+
<AnchorHeading
138+
title="`time-travel info`"
139+
slug="d1-time-travel-info"
140+
depth={3}
141+
/>
132142

133143
Inspect the current state of a database for a specific point-in-time using [Time Travel](/d1/reference/time-travel/).
134144

@@ -221,7 +231,11 @@ wrangler d1 backup download <DATABASE_NAME> <BACKUP_ID>
221231
- `--output` <Type text="string" /> <MetaInfo text="optional" />
222232
- The `.sqlite3` file to write to (defaults to `'<DB_NAME>.<SHORT_BACKUP_ID>.sqlite3'`).
223233

224-
<AnchorHeading title="`migrations create`" slug="d1-migrations-create" depth={3} />
234+
<AnchorHeading
235+
title="`migrations create`"
236+
slug="d1-migrations-create"
237+
depth={3}
238+
/>
225239

226240
Create a new migration.
227241

@@ -259,7 +273,11 @@ wrangler d1 migrations list <DATABASE_NAME> [OPTIONS]
259273
- `--preview` <Type text="boolean" /> <MetaInfo text="optional" />
260274
- 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)).
261275

262-
<AnchorHeading title="`migrations apply`" slug="d1-migrations-apply" depth={3} />
276+
<AnchorHeading
277+
title="`migrations apply`"
278+
slug="d1-migrations-apply"
279+
depth={3}
280+
/>
263281

264282
Apply any unapplied migrations.
265283

0 commit comments

Comments
 (0)