Django help
edsherry
HOBBYOP

a year ago

I pushed my django backend up, it includes a new app, so some new tables in postgresql and an updated requirements.txt

I thought that when I push to github that railway sees the new migration files and migrates them, but I was wrong. I tried to connect via terminal, using railway link and then railway run python manage.py migrate. That only tried to run migrations locally.

I then used railway up in terminal. It ran my procfile which I added but says it can't see env variables like SECRET_KEY. I have SECRET_KEY and everything else set on railway, so not sure what's happening. Anyway my backend is down, can anybody tell me what I'm missing?

Thanks.

Closed

2 Replies

brody
EMPLOYEE

a year ago

Hello,

You ran railway up while linked to the database, thus taking your database offline.

I've restored that.

I've also updated the pre-deploy command to run the migration command, but it looks like something in your code is trying to access the database before actually running the migrations.

Best,
Brody


Status changed to Awaiting User Response Railway 12 months ago


edsherry
HOBBYOP

a year ago

Thanks Brody, I appreciate the help. I'll look into that issue.


Status changed to Awaiting Railway Response Railway 12 months ago


Status changed to Closed unicodeveloper 12 months ago


Loading...