Prisma migrate dev error
the issue is like that; when i start project normally. it works and it connect database . there is no problem. but when i try with custom start command so its like that ; "npx prisma migrate deploy && npm start", it give bug which say it cant connect data base. how can i solve this problem. i have to migrate my prisma changes.. please help me
erorr is like that;
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "railway", schema "public" at "viaduct.proxy.rlwy.net:38891"
Error: P1001: Can't reach database server at viaduct.proxy.rlwy.net:38891
Please make sure your database server is running at viaduct.proxy.rlwy.net:38891.
npm WARN config production Use --omit=dev instead.
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
P
Percy•16d ago
Project ID:
N/A
B
Brody•16d ago
are you committing your .env file to your repo?
W
werscho•16d ago
yes but i delete database_url on my env file
should i delete whole .env file
B
Brody•16d ago
yes, I'm not saying that fixes your issue, but you never want to commit your .env file
W
werscho•16d ago
W
werscho•16d ago
how can i try that
B
Brody•16d ago
go into the database's setting and remove the tcp proxy, then add it back
W
werscho•16d ago
okay im trying now
thanks a alot
i will come back
after i tryt
i cant see tcp proxy
B
Brody•16d ago
screenshot please
W
werscho•16d ago
B
Brody•16d ago
scroll back to the top
W
werscho•16d ago
B
Brody•16d ago
it's right there under public networking, remove it then add the same 5432 port back
W
werscho•16d ago
B
Brody•16d ago
add it back
W
werscho•16d ago
W
werscho•16d ago
i got this error
i dont understand really
it wasnt like that
can i connect server with ssh root @....
B
Brody•16d ago
have you added the tcp proxy back to the database?
W
werscho•16d ago
W
werscho•16d ago
can you connect to my project ?
i can give my project id
B
Brody•16d ago
i dont work for railway, so i wouldnt have access to such things
can you connect to the database locally from something like dbgate
W
werscho•16d ago
dude
you know whats intersting. when i start project without custom start .it connect succesfully
B
Brody•16d ago
that is indeed odd
W
werscho•16d ago
but when i want to migrate project
it give error
B
Brody•16d ago
can you try to add a 3 second sleep before the migration command
W
werscho•16d ago
for backend or for database
W
werscho•16d ago
B
Brody•16d ago
i didnt mention anything about app sleeping
W
werscho•16d ago
i will freak out
B
Brody•16d ago
okay?
W
werscho•16d ago
it doesnt work
B
Brody•16d ago
please try adding a 3 second sleep before the migration command
W
werscho•16d ago
should i delete and restart project?
B
Brody•16d ago
no
W
werscho•16d ago
bro im so sorry i feel like stupid but i have to ask you how can ii add
B
Brody•16d ago
whats your current start command and where is it set
W
werscho•16d ago
B
Brody•16d ago
send the start command here please
W
werscho•16d ago
i alread do it
B
Brody•16d ago
in text
W
werscho•16d ago
npx prisma migrate dev && npm start
B
Brody•16d ago
why send an id?
W
werscho•16d ago
sorry
accidenlty
B
Brody•16d ago
sleep 3 && npx prisma migrate dev && npm start
W
werscho•16d ago
im doing now bro
W
werscho•16d ago
W
werscho•16d ago
bro can i connect this server with ssh root
?
i have to connect
B
Brody•16d ago
you are no longer getting connection errors
W
werscho•16d ago
is there method like that
B
Brody•16d ago
there is not, why is that needed though?
W
werscho•16d ago
bro i solved that thanks a lot
B
Brody•16d ago
awsome!
Hang out with other likeminded developers & talk about all things https://railway.app on the Railway Community Server.
24KMembers
View on DiscordWant results from more Discord servers?
More PostsNextjs memory usage issueHie everyone i just deployed a basic nextjs 14 app and its averaging 1.8GB of memory usage.. is thiTrial reset (testing)Tried Railway for Laravel about a year ago and had no success, had to remain on Heroku for time beinAccess blockedHello, i have this problem
railway.app has not completed the Google verification process. The app isCan't get www to work on railwayI'm trying to have it so that users can go to www.mypetnote.com and be redirected to my project whic503 error after adding TailwindCSS into my projectSo I recently decided to style my website with tailwindcss as vanilla CSS was becoming quite. tediouError using mailgun apilibrary: 'SSL routines',
reason: 'wrong version number',Need help on the billingI had a problem with the payment that has already been arranged, will my services be automatically rData migration to another databaseHello. I want to migrate my data from a database in one of my accounts to the database in a new accoTransfer one service from one project to anotherHow i can transfer my service from one project to anotherHelp with GhostThe Ghost forum is dead so that's why I post here. I added a third tier and it does not show up on tCould not find a suitable TLS CA certificate bundleDeploying the fast api tepmplate with 3.11 and pdm
https://github.com/railwayapp-templates/fastapi/tPush to GitHubI have a telegram bot that locally stores user ids. And every time a new user logs in, this file witTCP connection via private railway network times out48f3719a-323b-4609-812c-5b818714b649 deployment id, 2d76fc7b-e09c-410f-b7e3-117dfccc41bf project id.Cron job(s) didn't run on schedule (every 6 hours)The last execution was around 15 hours ago, around the time I deployed it via Github.Trial with Pro planHey there! We are a very small startup! I just signed up with Railway and checked the pricing plans.Build rerunsWhen my application is building it build's succesfully, but when in tries to publish it will rebuilddata deleteddeleted an entire team project by mistake is there any way of getting back the instances // tables?Writting a file gives me an Error: EACCES: permission deniedI have to create and download files dynamically, in other questions on this discord, I have seen thaObservability - 24 hour time formatThe observability feature now displays the time in a 12-hour format, without indicating AM or PM. ItSlow Image PushSometimes on railway I'm noticing builds taking over 10 minutes just to build my next.js application