From 87ac687a0dd1d7a799aa208c06e5cbe9e40ff0ba Mon Sep 17 00:00:00 2001 From: Ashley Grealish Date: Tue, 29 Oct 2024 15:50:24 +0000 Subject: [PATCH] Update enabling-timescale.html.markerb The guide didn't work if followed in order as the user doesn't know the database name until it's attached to an app. Instead, we connect to the database server without a database specified to create the extension, then attached to an app to create a database. Also updated to timescale 16 --- postgres/getting-started/enabling-timescale.html.markerb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/postgres/getting-started/enabling-timescale.html.markerb b/postgres/getting-started/enabling-timescale.html.markerb index 6a290e3731..e50869c914 100644 --- a/postgres/getting-started/enabling-timescale.html.markerb +++ b/postgres/getting-started/enabling-timescale.html.markerb @@ -17,7 +17,7 @@ provision a new Postgres app using our TimescaleDB-adapted image. Specify the `postgres-flex-timescaledb` image with the `--image-ref` flag: ```cmd -fly pg create --image-ref flyio/postgres-flex-timescaledb:15 +fly pg create --image-ref flyio/postgres-flex-timescaledb:16 ``` ## Create the extension @@ -25,10 +25,15 @@ fly pg create --image-ref flyio/postgres-flex-timescaledb:15 Connect to your postgres database: ```cmd # Connect to your target database -fly pg connect --app --database +fly pg connect --app ``` From the `postgres=# %` prompt, create the extension: ```sql CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE; ``` + +## (Optional) Attach to an app +``` + fly pg attach --app +```