Nx Tools
APIExecutorspush

push

Pushes the Prisma schema state directly to the database without creating migrations.

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 intended for development and prototyping. Use migrations for production environments.

Examples

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

You may want to use a custom schema file:

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

Force push changes even if data loss might occur:

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

Options:

Prop

Type

Last updated on

On this page