How to interact with database in prisma studio after deployment?
After deploying I set DATABASE_URL=<database_string> in main.wasp to try and see if i could interact with it like we could in development using
wasp db studio
,
i also triedexport DATABASE_URL="<database_string>"
npx prisma studio --schema=./.wasp/out/db/schema.prisma
in terminal, but it can't seem to be connecting. Is there a work around this?
7 Replies
In order to connect to your Fly production database, you could open up a tunnel with
fly proxy 5432 -a <db-name>
Here you can find extra info on how to do it 🙂GitHub
Update the database docs on seeding the production DB on Fly · Issu...
We are looking to update this section of the docs to include instructions on how to seed a production db: https://wasp-lang.dev/docs/data-model/backends#seeding-the-database This is a tested workfl...
Following the steps above and then executing
wasp db studio
worked for me 🙂Just don't forget to remove the DATABASE_URL with production database url from .env.server if you put it thre, so you don't accidetanly do something you didn't want to on the production database later
Thank you so much everybody. I really appreciate this.
Hehe no worries!