tursodatabase / turso-cli

Command line interface to Turso.
https://turso.tech
MIT License
215 stars 35 forks source link

turso db list shows primary URL for replicas #51

Closed haaawk closed 1 year ago

haaawk commented 1 year ago
% ./turso db create test
Created database test to Amsterdam, Netherlands (ams) in 8 seconds.

You can access the database by running:

   psql postgresql://169.155.55.27

   http://haaawk:9L1rfb37O8t62F04@169.155.55.27

% ./turso db replicate test waw
Replicated database test to Warsaw, Poland (waw) in 8 seconds.

You can access the database by running:

   psql postgresql://137.66.58.172

   http://haaawk:Inf1i63EH7v94F05@137.66.58.172

% ./turso db list
NAME      TYPE     HOST            REGION                        URL
test      primary  169.155.55.27   Amsterdam, Netherlands (ams)  http://haaawk:W63lPF49SaQ827n0@149.248.199.3
test      replica  137.66.58.172   Warsaw, Poland (waw)          http://haaawk:W63lPF49SaQ827n0@149.248.199.3

URL returned from replica creation is different than URL shown for the replica when running db list. db list shows primary URL for replicas.

penberg commented 1 year ago

I guess we need to start storing the database ID for any of this to work correctly.

haaawk commented 1 year ago

I don't see a way around it.

On Tue, Jan 24, 2023, 08:25 Pekka Enberg @.***> wrote:

I guess we need to start storing the database ID for any of this to work correctly.

— Reply to this email directly, view it on GitHub https://github.com/chiselstrike/iku-turso-cli/issues/51#issuecomment-1401490505, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKADLK4JXBYW3N5J7RWDNLWT57V5ANCNFSM6AAAAAAUEWCBXU . You are receiving this because you authored the thread.Message ID: @.***>