I have followed https://www.prisma.io/docs/get-started/01-setting-up-prisma-new-database-JAVASCRIPT-a002 and gotten it to work. I can see the following:
docker ps tells me that two docker containers are being runnode index.js each time shows a list of all users that have been created. hence, there is a database somewhere docker exec -it POSTGRE_CONTAINER_ID bash, I get a command prompt.psql or psql prisma, i get psql: FATAL: role "root" does not exist How do I see in which database/table is prisma saving my data in, and how do I connect to it?
Prisma doesn't store data in the public schema by default. It stores it in an schema derived from your service name (default$default is the default when no service and stage is provided in the endpoint).
You can do the follow steps to see the underlying data:
docker psdocker exec -it <POSTGRES_CONTAINER_ID> psql -U prisma\dn to grab all schemas, and find the schema that your service is using(it is default$default by default)SET search_path to <YOUR_SCHEMA_NAME_FROM_STEP_3>; to change the default search path\dt to list all tables. You can also run any SQL command now on that schema.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With