Hey guys. Im new to coding and I wanted to get som...
# orm-help
d
Hey guys. Im new to coding and I wanted to get some opinions. What modules are you guys using to mock postgresql database for testing?
j
if you want to mock an actual db, you could skip postgres and just use sqlite. unless you are opting for integration testing you can trust that prisma and postgres do what they are supposed to do and just mock prisma itself instead. if you really would like to use postgres, it's only a docker command to spin one up, eg:
docker run --name dave-psql -p 11111:5432 -e POSTGRES_PASSWORD=password -d postgres
and set prisma env
<postgresql://postgres>:password@localhost:11111/postgres?schema=public
when you're done you could either just remove and prune the container and its volume just drop the schema that you used, eg:
psql <postgres://postgres>:password@localhost:11111/postgres -c 'DROP SCHEMA public CASCADE;'
d
thanks @jknr! Ill look into this