Back to Prisma1

README

cli/packages/prisma-generate-schema/scripts/README.md

1.34.12883 B
Original Source

Scripts to re-generate unit tests

These scripts re-generate the ground-truth schema for all unit tests from an existing prisma service.

Workflow

Workfow for re-generating tests using these scripts. Please make sure you are in the correct working directory when executing them.

Automated

  1. Start in this directory
  2. ./refreshAll.sh

Manual

  1. Start in this directory.
  2. cd mongodb or cd mysql.
  3. (optional) docker-compose up (if you want to run this locally).
  4. Set the PRISMA_HOST environment variable to your prisma host.
  5. Execute ../deploySchemas.sh, which will deploy all test models to https://$PRISMA_HOST:4466/schema-generator/MODEL.
  6. cd ..
  7. ./fetchSchemas NAME, where name is usually relational or document, depending on which DB is running on your PRISMA_HOST.
  8. If you used docker, you can stop your containers again.