W
Wasp3mo ago
fustuk.

Wasp Railway Migrations

So my app is hosted on railway, they do not provide ssh access to their servers but I get the following error, my migration failed and when I follow the prisma link to resolve it it says to rollback the migration and fix it, how do I do that if I dont have access to the server? https://www.prisma.io/docs/orm/prisma-migrate/workflows/patching-and-hotfixing#failed-migration
Patching & hotfixing | Prisma Documentation
How to reconcile the migration history after applying a hotfix or patch to a production environment.
No description
4 Replies
kapa.ai
kapa.ai3mo ago
Hi @fustuk.. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain specific information about handling migrations on Railway with Wasp. However, it's important to note that Wasp uses Prisma for database management, and Prisma provides several commands for handling migrations, including rolling back. In general, if you have access to your production database, you might be able to connect to it directly and manage migrations that way. For example, in Wasp, you can use the DATABASE_URL=<production_db_url> wasp db seed command to seed your production database, although this method is not recommended due to security concerns (source (https://github.com/wasp-lang/wasp/issues/908)). For more specific guidance, I recommend checking the Prisma documentation (https://www.prisma.io/docs/orm/prisma-migrate/workflows/patching-and-hotfixing#failed-migration) or reaching out to the Railway support for assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @fustuk., I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
fustuk.
fustuk.OP3mo ago
is there even a wasp db command for rollbacks? nvm fixed it
martinsos
martinsos3mo ago
Hah :D. How did you fix it @fustuk. ? Btw they must have some kind of way to connect to the server and execute commands, how would that work otherwise?
fustuk.
fustuk.OP3mo ago
sorry I just saw that, they have a weird way of interacting with their server... you run railway run {command_to_run} so I deleted the migration, deleted the data that was causing issues and redeployed and it worked
Want results from more Discord servers?
Add your server