Skip to content

Commit 94d16db

Browse files
committed
thomasgauvin:rename file and add note to update in situ
1 parent 9979064 commit 94d16db

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ You can change the connection information and the connection credentials of your
1212
1. (Recommended) Create a new Hyperdrive configuration with the new connection information and credentials, and update your Worker to use the new Hyperdrive configuration.
1313
2. Update the existing Hyperdrive configuration with the new connection information and credentials.
1414

15-
## Use a new Hyperdrive configuration
15+
## Use a new Hyperdrive configuration (Recommended)
1616

17-
Creating a new Hyperdrive configuration to update your database credentials allows you to keep your existing Worker configuration unchanged, gradually migrate your Worker to the new Hyperdrive configuration and easily roll back to the previous configuration if needed. To create a Hyperdrive that connects to an existing PostgreSQL database, use the [wrangler](/workers/wrangler/install-and-update/) CLI or the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers-and-pages/hyperdrive).
17+
Creating a new Hyperdrive configuration to update your database credentials allows you to keep your existing Worker configuration unchanged, gradually migrate your Worker to the new Hyperdrive configuration and easily roll back to the previous configuration if needed.
18+
19+
To create a Hyperdrive that connects to an existing PostgreSQL database, use the [wrangler](/workers/wrangler/install-and-update/) CLI or the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers-and-pages/hyperdrive).
1820

1921
```sh
2022
# wrangler v3.11 and above required
@@ -32,7 +34,7 @@ binding = "HYPERDRIVE"
3234
id = "<your-hyperdrive-id-here>"
3335
```
3436

35-
To update your Worker to use the new Hyperdrive configuration, redeploy your Worker or use [gradual deployments](https://developers.cloudflare.com/workers/configuration/versions-and-deployments/gradual-deployments/).
37+
To update your Worker to use the new Hyperdrive configuration, redeploy your Worker or use [gradual deployments](/workers/configuration/versions-and-deployments/gradual-deployments/).
3638

3739
## Update the existing Hyperdrive configuration
3840

@@ -42,3 +44,7 @@ You can update the configuration of an existing Hyperdrive configuration using t
4244
# wrangler v3.11 and above required
4345
npx wrangler hyperdrive update <HYPERDRIVE_CONFIG_ID> --origin-host <YOUR_ORIGIN_HOST> --origin-password <YOUR_ORIGIN_PASSWORD> --origin-user <YOUR_ORIGIN_USERNAME> --database <YOUR_DATABASE> --origin-port <YOUR_ORIGIN_PORT>
4446
```
47+
48+
:::note
49+
Updating the settings of an existing Hyperdrive configuration does not purge Hyperdrive's cache and does not tear down the existing database connection pool. New connections will be established using the new connection information.
50+
:::

0 commit comments

Comments
 (0)