# prisma-next migration new (/docs/cli/next/migration-new)

> 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.

Scaffold a Prisma Next migration package for manual authoring.

Location: CLI > Next > prisma-next migration new

`prisma-next migration new` creates a migration package with a `migration.ts` file for manual authoring.

Use it when the generated plan is not enough and you want to write the migration operations yourself.

## Usage [#usage]

```bash
prisma-next migration new --name split-name
```

## Options [#options]

| Option            | What it does                                                              |
| ----------------- | ------------------------------------------------------------------------- |
| `--name <slug>`   | Sets the migration directory name suffix.                                 |
| `--from <hash>`   | Sets the starting contract hash. Defaults to the latest migration target. |
| `--config <path>` | Reads a specific `prisma-next.config.ts` file.                            |
| `--json`          | Prints a machine-readable result.                                         |

## Examples [#examples]

```bash
prisma-next migration new --name split-name
prisma-next migration new --name custom-fk --from sha256:abc...
```

## After scaffolding [#after-scaffolding]

Edit the generated migration package, then inspect it:

```bash
prisma-next migration show
```

Apply the migration only after review:

```bash
prisma-next migration apply --db "$DATABASE_URL"
```

Manual migrations should still end at a contract state that matches the emitted contract.

## 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.