Connecting App to postgres
williamkunda84
FREEOP

5 months ago

I have successfully connected to a Postgres image but i cant run migrations

Closed$10 Bounty

4 Replies

cpantis
FREE

5 months ago

Could you share:

  • What migration tool you're using (Prisma, Drizzle, TypeORM, etc.)?
  • The exact error message you're getting?
  • Are you running migrations locally or in a Railway deployment?

You should be running migrations in the pre-deploy step, not during the build step.


Anonymous
HOBBY

5 months ago

i add it to my package.json to run during deployment

"scripts": {

"dev": "tsx watch src/index.ts",

"build": "tsc && cp -r src/storage/migrations dist/storage/",

"migrate": "node dist/migrate.js",

"start": "node dist/migrate.js && node dist/index.js",

"typecheck": "tsc --noEmit"

},


Are you getting any errors?


Status changed to Closed angelo-railway 5 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...