How to automatically call 'prisma push'?

Hello, I just tried to deploy my first t3 app on vercel+railway, however everytime I called a route, which accesses the database I got the error: 'The table prisma.XYZ does not exist in the current database'. After reading up a bit, I realized, I needed to run 'npx prisma db push' first, to seed the database. Since this command doesn't seem to be run automatically, with the default config, and I obviously use a different db, when developing locally, when compared to actually publishing the code, I'm wondering how you people handle this problem of having to push the db schema first. Is there some established pattern?
1 Reply
Vincent Udén
Vincent Udén2y ago
I guess I dont know how often you're changing the DB schema. But unless that is a multiple-times-per-day thing, pushing to your DB manually isn't really a problem, that's what I do. If you really have to automate it, it should be possible through Github action on every merged pull request to the master branch or whenever else you feel like it
Want results from more Discord servers?
Add your server