Connecting App to postgres
williamkunda84
FREEOP
a month ago
I have successfully connected to a Postgres image but i cant run migrations
4 Replies
cpantis
FREE
a month 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?
a month ago
You should be running migrations in the pre-deploy step, not during the build step.
Anonymous
HOBBY
a month 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"
},
Status changed to Closed angelo-railway • about 1 month ago