hello everyone just a newbie question. but where d...
# orm-help
j
hello everyone just a newbie question. but where does prisma store database in postrgres database? in public => tables there are no tables
r
@Jordansz 👋 The default schema used is
public
but you can specify a custom schema. What process did you follow to add the tables?
j
Im trying to figure out why my public is empty for an existing app with prisma and postgres and it reall got me lost.
i can do prisma studio and see my data ( i do have the correct database ) but when using a pg admin tool to view the tables they are not in public where I expect them.
I would expect any data in my prisma app would be visible in tables in the postgres database I have entered as datasource?
but its empty on all occasions, terminal pg admin etc.
r
What’s the database URL in your
schema.prisma
? Does it match the one you’re connecting to in PgAdmin?
j
yes it does match correctly
so thats the strange thing that i dont see the data in my prisma.schema and my prisma studio in the database
r
You won’t see any data in your
schema.prisma
. This only contains the models, the data can be viewed through Studio. I would like to know the step by step process you performed to connect Prisma to your database.
j
yes i understand the schema.prisma
im running prisma with blitz
blitzjs.com still havent resolved the problem
its really strange, the data should be in the postgresql database right? or does the prisma client create a local data store.
Just don't get where it goes wrong since I do have the data when I open prisma studio but not when i view the database in postgres. Actually I can see all my locahost databases and there are just 2 of them i even checked the other database table but no data there either.
r
Could you share your project as I would like to test it locally
j
hello i was away. I cannot easily share it
could you perhaps give some pointers on how to debug this?
if i understand correctly the postgres database contains all data and prisma generates a 'mapping' with prisma generate client
and postgres should contain the tables that are in my prisma schema under public / tables
r
Yes that's correct. I have never come across a situation where there are no tables in the database after performing Migrate so I don't have any pointers on this unfortunately
j
ok really strange im going to test a new blitz project and see if it happens there too thank you
👍 1
r
Let me know how it goes 🙂
j
the problem was a missing database name in the connection string 😕
💯 1
so my data was written to postgres schemas instead of the custom database so a stupid newbie issue on my end
👍 1