Skip to content

Commit 99032c1

Browse files
authored
chore: make D1's experimental backend the default (#3668)
* chore: make D1's experimental backend the default * fix: actually remove the experimental backend flag
1 parent e2234bb commit 99032c1

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

.changeset/kind-buckets-scream.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
chore: make D1's experimental backend the default
6+
7+
This PR makes D1's experimental backend turned on by default.

packages/wrangler/src/d1/create.tsx

+8-15
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,17 @@ export function Options(yargs: CommonYargsArgv) {
2525
"A hint for the primary location of the new DB. Options:\nweur: Western Europe\neeur: Eastern Europe\napac: Asia Pacific\nwnam: Western North America\nenam: Eastern North America \n",
2626
type: "string",
2727
})
28-
.option("experimental-backend", {
29-
default: false,
30-
describe: "Use new experimental DB backend",
31-
type: "boolean",
32-
})
3328
.epilogue(d1BetaWarning);
3429
}
3530

3631
type HandlerOptions = StrictYargsOptionsToInterface<typeof Options>;
3732
export const Handler = withConfig<HandlerOptions>(
38-
async ({ name, config, location, experimentalBackend }): Promise<void> => {
33+
async ({ name, config, location }): Promise<void> => {
3934
const accountId = await requireAuth(config);
4035

4136
logger.log(d1BetaWarning);
4237

43-
if (!experimentalBackend && location) {
38+
if (location) {
4439
if (LOCATION_CHOICES.indexOf(location.toLowerCase()) === -1) {
4540
throw new Error(
4641
`Location '${location}' invalid. Valid values are ${LOCATION_CHOICES.join(
@@ -59,8 +54,8 @@ export const Handler = withConfig<HandlerOptions>(
5954
},
6055
body: JSON.stringify({
6156
name,
57+
experimental: true,
6258
...(location && { primary_location_hint: location }),
63-
...(experimentalBackend && { experimental: true }),
6459
}),
6560
});
6661
} catch (e) {
@@ -81,13 +76,11 @@ export const Handler = withConfig<HandlerOptions>(
8176
? ` using primary location hint ${location}`
8277
: ``}
8378
</Text>
84-
{experimentalBackend && (
85-
<Text>
86-
Created your database using D1&apos;s new storage backend. The new
87-
storage backend is not yet recommended for production workloads
88-
and does not yet support backups.
89-
</Text>
90-
)}
79+
<Text>
80+
Created your database using D1&apos;s new storage backend. The new
81+
storage backend is not yet recommended for production workloads, but
82+
backs up your data via point-in-time restore.
83+
</Text>
9184
<Text>&nbsp;</Text>
9285
<Text>[[d1_databases]]</Text>
9386
<Text>

0 commit comments

Comments
 (0)