You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
389 B

11 months ago
  1. const { PrismaClient } = require("@prisma/client");
  2. // npx prisma introspect
  3. // npx prisma generate
  4. // npx prisma migrate dev --name init -> ensures that db is in sync with schema
  5. // npx prisma migrate reset -> resets the db
  6. const logLevels = ["error", "info", "warn"]; // add "query" to debug query logs
  7. const prisma = new PrismaClient({
  8. log: logLevels,
  9. });
  10. module.exports = prisma;