Nx Tools
APIExecutorspull

pull

Pulls changes from the database schema and updates your Prisma schema file.

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.

Info

This command is useful when you want to synchronize your Prisma schema with changes made directly to the database.

Examples

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

You may want to use a custom schema file:

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

Force pull changes even if data loss might occur:

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

Options:

Prop

Type

Last updated on

On this page