sandbox/driver-adapters/README.md
This is a playground for testing the Prisma Client with Driver Adapters (aka Node.js Drivers).
We assume Node.js v20.19+ is installed. If not, run nvm use in the current directory.
This is very important to double-check if you have multiple versions installed, as PlanetScale requires either Node.js v20.19+ or a custom fetch function.
.envrc starting from .envrc.example, and fill in the missing values following the given templatepnpm i
pnpm prisma generate --schema prisma/postgres/schema.prisma)Settings > Passwords, and create a new password for the main database branch. Select the Prisma template and copy the generated URL (comprising username, password, etc). Paste it in the JS_PLANETSCALE_DATABASE_URL environment variable in .envrc.In the current directory:
pnpm prisma:planetscale to push the Prisma schema, insert the test data, and generate the Prisma Client.pnpm planetscale to run smoke tests against the PlanetScale database.You can also observe more logs by specifying the environment variable DEBUG="prisma:driver-adapter:planetscale".
npx neonctl projects create or in Neon Console.JS_NEON_DATABASE_URL.In the current directory:
pnpm prisma:neon to push the Prisma schema, insert the test data, and generate the Prisma Client.pnpm neon to run smoke tests against the Neon database.You can also observe more logs by specifying the environment variable DEBUG="prisma:driver-adapter:neon".
JS_PPG_DATABASE_URL env variable.You can also observe more logs by specifying the environment variable DEBUG="prisma:driver-adapter:ppg".
In the current directory:
pnpm planetscale to run smoke tests against the PlanetScale databasepnpm neon to run smoke tests against the Neon databasepnpm ppg to run smoke tests against the Prisma Postgres database