# dev (Prisma CLI v7) (/docs/cli/v7/migrate/dev) > 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. Create a migration from changes in Prisma schema, apply it to the database, and trigger generators Location: CLI > v7 > migrate > dev The `prisma migrate dev` command creates and applies migrations during development. It requires a [shadow database](https://www.prisma.io/docs/orm/v7/prisma-migrate/understanding-prisma-migrate/shadow-database). **For use in development environments only.** > [!WARNING] > This command is not supported on [MongoDB](https://www.prisma.io/docs/orm/v7/core-concepts/supported-databases/mongodb). Use [`db push`](https://www.prisma.io/docs/cli/v7/db/push) instead. ## Usage [#usage] ```bash prisma migrate dev [options] ``` The datasource URL configuration is read from the Prisma config file (e.g., `prisma.config.ts`). ## How it works [#how-it-works] 1. Reruns the existing migration history in the shadow database to detect schema drift 2. Applies pending migrations to the shadow database 3. Generates a new migration from any changes you made to the Prisma schema 4. Applies all unapplied migrations to the development database and updates the `_prisma_migrations` table > [!NOTE] > **Prisma v7**: `migrate dev` no longer automatically triggers `prisma generate` or seed scripts. Run them explicitly if needed. ## Options [#options] | Option | Description | | --------------- | ------------------------------------------------------- | | `-h`, `--help` | Display help message | | `--config` | Custom path to your Prisma config file | | `--schema` | Custom path to your Prisma schema | | `--url` | Override the datasource URL from the Prisma config file | | `-n`, `--name` | Name the migration | | `--create-only` | Create a new migration but do not apply it | > [!NOTE] > If a [schema drift](https://www.prisma.io/docs/orm/v7/prisma-migrate/understanding-prisma-migrate/shadow-database#detecting-schema-drift) is detected while running with `--create-only`, you will be prompted to reset your database. ## Examples [#examples] ### Create and apply migrations [#create-and-apply-migrations] #### bun ```bash bunx prisma migrate dev ``` #### pnpm ```bash pnpm prisma migrate dev ``` #### yarn ```bash yarn prisma migrate dev ``` #### npm ```bash npx prisma migrate dev ``` ### Name the migration [#name-the-migration] #### bun ```bash bunx prisma migrate dev --name added_job_title ``` #### pnpm ```bash pnpm prisma migrate dev --name added_job_title ``` #### yarn ```bash yarn prisma migrate dev --name added_job_title ``` #### npm ```bash npx prisma migrate dev --name added_job_title ``` ### Create migration without applying [#create-migration-without-applying] #### bun ```bash bunx prisma migrate dev --create-only ``` #### pnpm ```bash pnpm prisma migrate dev --create-only ``` #### yarn ```bash yarn prisma migrate dev --create-only ``` #### npm ```bash npx prisma migrate dev --create-only ``` This creates the migration file but doesn't apply it. Run `prisma migrate dev` again to apply. ### Specify a schema path [#specify-a-schema-path] #### bun ```bash bunx prisma migrate dev --schema=./alternative/schema.prisma ``` #### pnpm ```bash pnpm prisma migrate dev --schema=./alternative/schema.prisma ``` #### yarn ```bash yarn prisma migrate dev --schema=./alternative/schema.prisma ``` #### npm ```bash npx prisma migrate dev --schema=./alternative/schema.prisma ``` ## See also [#see-also] * [Conceptual overview of Prisma Migrate](https://www.prisma.io/docs/orm/v7/prisma-migrate) * [Developing with Prisma Migrate](https://www.prisma.io/docs/orm/v7/prisma-migrate) ## Related pages - [`deploy`](https://www.prisma.io/docs/cli/v7/migrate/deploy): Apply pending migrations to update the database schema in production/staging - [`diff`](https://www.prisma.io/docs/cli/v7/migrate/diff): Compare the database schema from two arbitrary sources - [`reset`](https://www.prisma.io/docs/cli/v7/migrate/reset): Reset your database and apply all migrations. All data will be lost - [`resolve`](https://www.prisma.io/docs/cli/v7/migrate/resolve): Resolve issues with database migrations in deployment databases - [`status`](https://www.prisma.io/docs/cli/v7/migrate/status): Check the status of your database migrations