# prisma-next db sign (/docs/cli/next/db-sign)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Sign a database with the current Prisma Next contract.

Location: CLI > Next > prisma-next db sign

`prisma-next db sign` verifies that the live database satisfies the emitted contract and writes the database signature.

Use it after importing or inferring an existing schema, or after a deployment flow that already applied the required database changes.

## Usage [#usage]

```bash
prisma-next db sign --db "$DATABASE_URL"
```

## Options [#options]

| Option            | What it does                                   |
| ----------------- | ---------------------------------------------- |
| `--db <url>`      | Connects to the database.                      |
| `--config <path>` | Reads a specific `prisma-next.config.ts` file. |
| `--json`          | Prints a machine-readable result.              |

## Example [#example]

```bash
prisma-next contract emit
prisma-next db sign --db "$DATABASE_URL"
prisma-next db verify --db "$DATABASE_URL"
```

## When to use it [#when-to-use-it]

Use `db sign` only after you believe the live database already matches the emitted contract. It is common after:

* `contract infer` for a brownfield database
* a manually reviewed migration flow
* a database restore that you need to mark as matching the current contract

Do not use `db sign` to hide drift. If verification fails, fix the contract or database first.

## Related pages

- [`CLI configuration`](https://www.prisma.io/docs/cli/next/configuration): Configure Prisma Next CLI commands with prisma-next.config.ts and global flags.
- [`prisma-next contract emit`](https://www.prisma.io/docs/cli/next/contract-emit): Emit Prisma Next contract artifacts.
- [`prisma-next contract infer`](https://www.prisma.io/docs/cli/next/contract-infer): Infer a starter contract from an existing database.
- [`prisma-next db init`](https://www.prisma.io/docs/cli/next/db-init): Initialize a database from the current Prisma Next contract.
- [`prisma-next db schema`](https://www.prisma.io/docs/cli/next/db-schema): Inspect a live database schema.