8 months 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
8 months ago
do you have any postgres client?
8 months 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
8 months ago
railway ssh
8 months ago
and then after the connection is established, type psql and hit enter
8 months ago
then just hit any query you want
service name as in, this? shuttle.proxy.rlwy.net ?
8 months ago
sorry, hit railway link first and then railway ssh
8 months ago
railway link will go through the setup
8 months ago
did you hit psql? can you send a screenshot
Project nurturing-peace linked successfully! 🎉 PS C:\Users\kemal\OneDrive\Documents\GitHub\cms\4_rail> npx railway ssh ✓ Connected to interactive shell root@a29cee42a4ba:/#
8 months ago
great then type psql and hit enter
8 months ago
now feel free to type any sql query, make sure to end it with ;
railway=# alter table users; alter column user_id set default gen_random_uuid(); 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();
8 months ago
try a single command at a time
railway=# alter table users; ERROR: syntax error at or near ";" LINE 1: alter table users; ^ railway=# alter table users railway-# ; ERROR: syntax error at or near ";" LINE 2: ;
8 months ago
well the query itself is invalid, it should be like this:
alter table users alter column user_id set default gen_random_uuid();
8 months ago
wdym by can't paste and rewrite it all?
8 months ago
if you're on Windows, the CMD paste command is different
8 months ago
iirc it should be the right mouse button
8 months ago
yep
8 months ago
even tho I would recommend a sql viewer, a lot easier to manage
8 months 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.
8 months ago
it's easy, just add a connection and for credentials refer to your database variables tab
8 months ago
it's all through a GUI
8 months ago
if you've any questions lmk
8 months ago
you'll need to fill it out manually, dbeaver for some reason does not accept the DATABASE_URL
8 months ago
like select host and go from there
