a year ago
you can always get the DATABASE_PUBLIC_URL and use any postgres client like beekeper or the psql cli
can you elaborate on this please
56 Replies
a year ago
do you have any postgres client?
a year ago
as you already have the railway CLI, let's go with it but from now on I would recommend a postgres client like beekeper, dbeaver or even the psql cli
a year ago
railway ssh
a year ago
and then after the connection is established, type psql and hit enter
a year ago
then just hit any query you want
a year ago
sorry, hit railway link first and then railway ssh
a year ago
railway link will go through the setup
a year ago
did you hit psql? can you send a screenshot
PS C:\Users\kemal\OneDrive\Documents\GitHub\cms\4_rail> npx railway ssh
✓ Connected to interactive shell root@a29cee42a4ba:/# a year ago
great then type psql and hit enter
a year ago
now feel free to type any sql query, make sure to end it with ;
ERROR: syntax error at or near ";"
LINE 1: alter table users;
^
ERROR: syntax error at or near "column"
LINE 1: alter column user_id set default gen_random_uuid();```
a year ago
try a single command at a time
ERROR: syntax error at or near ";"
LINE 1: alter table users;
^
railway=# alter table users
railway-# ;
ERROR: syntax error at or near ";"
LINE 2: ;```
a year ago
well the query itself is invalid, it should be like this:
alter table users alter column user_id set default gen_random_uuid();
a year ago
wdym by can't paste and rewrite it all?
a year ago
if you're on Windows, the CMD paste command is different
a year ago
iirc it should be the right mouse button
a year ago
yep
a year ago
even tho I would recommend a sql viewer, a lot easier to manage
a year ago
what I use daily is beekeper as it has a better UI.
but I also keep dbeaver bcs beekeper can be limited in some actions.
a year ago
it's easy, just add a connection and for credentials refer to your database variables tab
a year ago
it's all through a GUI
a year ago
if you've any questions lmk
a year ago
you'll need to fill it out manually, dbeaver for some reason does not accept the DATABASE_URL
a year ago
like select host and go from there
