is there a local instance or something?
I definitely am pulling my data from somewhere, but it's not my production environment.
when i do, prisma.user.findMany() I see all the users I created. however, my production database and prisma studio are still empty.
where can I find this mysterious database and access it?
2 Replies
Skipping coffee for instant knowledge! Let's brew that AI answer now.
Yes, Prisma provides a local database instance for development, especially if you're using Prisma Postgres. When you run the command:
it starts a local Prisma Postgres server (powered by PGlite) that you can connect to using Prisma ORM. The output will give you a
DATABASE_URL like:
This connection string should be in your .env file. When you run queries like prisma.user.findMany(), you're interacting with this local database, not your production environment. That's why you see your test data locally, but your production database and Prisma Studio (if pointed at production) remain empty.
To access this local database, you can:
1. Use Prisma Studio locally by running:
This opens a browser window at <http://localhost:5555> where you can view and edit your local data.
2. Check your .env file to confirm which database your app is connected to.
If you want to switch to your production database, update the DATABASE_URL in your .env file to point to your production connection string. But for now, your data is in the local Prisma Postgres instance started by prisma dev Local development with Prisma Postgres Prisma CLI reference: dev Tooling.
🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly.
In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.Hey!
You are likely using local Prisma Postgres.
Did you run the command
npx prisma dev to start a local Prisma Postgres instance?