Nx Tools
APIExecutorsreset

reset

Resets the database by dropping all data and recreating the database structure.

Options can be configured in project.json when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/reference/project-configuration#targets.

Warning

This command is not supported on MongoDB. Use db push instead.

Examples

apps/your-app/project.json
"prisma-reset": {
  "executor": "@nx-tools/nx-prisma:reset",
}

You may want to use a custom schema file:

apps/your-app/project.json
"prisma-reset": {
  "executor": "@nx-tools/nx-prisma:reset",
  "options": {
    "schema": "custom-file.prisma",
  }
}

Skip confirmation prompts:

apps/your-app/project.json
"prisma-reset": {
  "executor": "@nx-tools/nx-prisma:reset",
  "options": {
    "schema": "prisma/schema.prisma",
    "force": true
  }
}

Options:

Prop

Type

Last updated on

On this page