diff --git a/content/200-orm/300-prisma-migrate/050-getting-started.mdx b/content/200-orm/300-prisma-migrate/050-getting-started.mdx index f56a1a607e..b78d99c41d 100644 --- a/content/200-orm/300-prisma-migrate/050-getting-started.mdx +++ b/content/200-orm/300-prisma-migrate/050-getting-started.mdx @@ -231,7 +231,7 @@ To create a baseline migration: ```terminal no-lines npx prisma migrate diff \ --from-empty \ - --to-schema-datamodel prisma/schema.prisma \ + --to-schema prisma/schema.prisma \ --script > prisma/migrations/0_init/migration.sql ``` 1. Review the generated migration. diff --git a/content/200-orm/300-prisma-migrate/300-workflows/30-baselining.mdx b/content/200-orm/300-prisma-migrate/300-workflows/30-baselining.mdx index caec87136d..fc1aa8a7a8 100644 --- a/content/200-orm/300-prisma-migrate/300-workflows/30-baselining.mdx +++ b/content/200-orm/300-prisma-migrate/300-workflows/30-baselining.mdx @@ -72,7 +72,7 @@ To create a baseline migration: ```terminal no-lines npx prisma migrate diff \ --from-empty \ - --to-schema-datamodel prisma/schema.prisma \ + --to-schema prisma/schema.prisma \ --script > prisma/migrations/0_init/migration.sql ``` diff --git a/content/200-orm/300-prisma-migrate/300-workflows/50-squashing-migrations.mdx b/content/200-orm/300-prisma-migrate/300-workflows/50-squashing-migrations.mdx index 2b594c4753..09f3460685 100644 --- a/content/200-orm/300-prisma-migrate/300-workflows/50-squashing-migrations.mdx +++ b/content/200-orm/300-prisma-migrate/300-workflows/50-squashing-migrations.mdx @@ -112,7 +112,7 @@ Then follow these steps, either on your `main` branch or on a newly checked out ```terminal npx prisma migrate diff \ --from-empty \ - --to-schema-datamodel ./prisma/schema.prisma \ + --to-schema ./prisma/schema.prisma \ --script > ./prisma/migrations/000000000000_squashed_migrations/migration.sql ``` diff --git a/content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx b/content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx index bc3e5af495..c47051f1cd 100644 --- a/content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx +++ b/content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx @@ -109,7 +109,7 @@ You will need to create the down migration first, before creating the correspond ```terminal wrap npx prisma migrate diff \ - --from-schema-datamodel prisma/schema.prisma \ + --from-schema prisma/schema.prisma \ --to-migrations prisma/migrations \ --shadow-database-url $SHADOW_DATABASE_URL \ --script > down.sql @@ -119,7 +119,7 @@ You will need to create the down migration first, before creating the correspond ```terminal wrap npx prisma migrate diff \ - --from-schema-datamodel prisma/schema.prisma \ + --from-schema prisma/schema.prisma \ --to-schema-datasource prisma/schema.prisma \ --script > down.sql ``` diff --git a/content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx b/content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx index d17cc95bbd..11449c98de 100644 --- a/content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx +++ b/content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx @@ -226,7 +226,7 @@ In this case, you need to fix the non-unique data and then go ahead with the res ```bash - npx prisma migrate diff --from-url "$DATABASE_URL_PROD" --to-schema-datamodel schema.prisma --script > forward.sql + npx prisma migrate diff --from-url "$DATABASE_URL_PROD" --to-schema schema.prisma --script > forward.sql ``` diff --git a/content/200-orm/500-reference/200-prisma-cli-reference.mdx b/content/200-orm/500-reference/200-prisma-cli-reference.mdx index 1b26be19ab..2e230dce17 100644 --- a/content/200-orm/500-reference/200-prisma-cli-reference.mdx +++ b/content/200-orm/500-reference/200-prisma-cli-reference.mdx @@ -1621,7 +1621,7 @@ One of the following `--from-...` options is required: | :------------------------- | :------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------- | | `--from-url` | A data source URL | | | `--from-migrations` | Path to the Prisma Migrate migrations directory | Not supported in MongoDB | -| `--from-schema-datamodel` | Path to a Prisma schema file, uses the data model for the diff | | +| `--from-schema` | Path to a Prisma schema file, uses the data model for the diff | | | `--from-schema-datasource` | Path to a Prisma schema file, uses the URL in the `datasource` block for the diff | | | `--from-empty` | Assume that you the data model you are migrating from is empty | | | `--from-local-d1` | Path to a local D1 instance ([learn more](/orm/overview/databases/cloudflare-d1#using-the-wrangler-cli-with-prisma-migrate-diff)) | Available since [5.12.0](https://github.com/prisma/prisma/releases/tag/5.12.0) | @@ -1632,7 +1632,7 @@ One of the following `--to-...` options is required: | :----------------------- | :------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------- | | `--to-url` | A data source URL | | | `--to-migrations` | Path to the Prisma Migrate migrations directory | Not supported in MongoDB | -| `--to-schema-datamodel` | Path to a Prisma schema file, uses the data model for the diff | | +| `--to-schema` | Path to a Prisma schema file, uses the data model for the diff | | | `--to-schema-datasource` | Path to a Prisma schema file, uses the URL in the `datasource` block for the diff | | | `--to-empty` | Assume that you the data model you are migrating to is empty | | | `--to-local-d1` | Path to a local D1 instance ([learn more](/orm/overview/databases/cloudflare-d1#using-the-wrangler-cli-with-prisma-migrate-diff)) | Available since [5.12.0](https://github.com/prisma/prisma/releases/tag/5.12.0) | diff --git a/content/800-guides/030-migrate-from-typeorm.mdx b/content/800-guides/030-migrate-from-typeorm.mdx index 4b852ac2b9..c1d2e2d279 100644 --- a/content/800-guides/030-migrate-from-typeorm.mdx +++ b/content/800-guides/030-migrate-from-typeorm.mdx @@ -97,7 +97,7 @@ This will create a `schema.prisma` file with your database schema. Create and apply a baseline migration to mark the current state of your database: ```terminal -npx prisma migrate diff --from-empty --to-schema-datamodel prisma/schema.prisma --script > baseline.sql +npx prisma migrate diff --from-empty --to-schema prisma/schema.prisma --script > baseline.sql npx prisma migrate resolve --applied "baseline" ``` diff --git a/content/800-guides/040-migrate-from-sequelize.mdx b/content/800-guides/040-migrate-from-sequelize.mdx index 663f59366a..2f8bc9c460 100644 --- a/content/800-guides/040-migrate-from-sequelize.mdx +++ b/content/800-guides/040-migrate-from-sequelize.mdx @@ -132,11 +132,11 @@ mkdir -p prisma/migrations/0_init Next, generate the migration file with `prisma migrate diff`. Use the following arguments: - `--from-empty`: assumes the data model you're migrating from is empty -- `--to-schema-datamodel`: the current database state using the URL in the `datasource` block +- `--to-schema`: the current database state using the URL in the `datasource` block - `--script`: output a SQL script ```terminal wrap -npx prisma migrate diff --from-empty --to-schema-datamodel prisma/schema.prisma --script > prisma/migrations/0_init/migration.sql +npx prisma migrate diff --from-empty --to-schema prisma/schema.prisma --script > prisma/migrations/0_init/migration.sql npx prisma migrate resolve --applied 0_init ``` diff --git a/content/800-guides/060-migrate-from-drizzle.mdx b/content/800-guides/060-migrate-from-drizzle.mdx index e6f1004a2a..f1c2eb7ac7 100644 --- a/content/800-guides/060-migrate-from-drizzle.mdx +++ b/content/800-guides/060-migrate-from-drizzle.mdx @@ -215,11 +215,11 @@ mkdir -p prisma/migrations/0_init Next, generate the migration file with `prisma migrate diff`. Use the following arguments: - `--from-empty`: assumes the data model you're migrating from is empty -- `--to-schema-datamodel`: the current database state using the URL in the `datasource` block +- `--to-schema`: the current database state using the URL in the `datasource` block - `--script`: output a SQL script ```terminal wrap -npx prisma migrate diff --from-empty --to-schema-datamodel prisma/schema.prisma --script > prisma/migrations/0_init/migration.sql +npx prisma migrate diff --from-empty --to-schema prisma/schema.prisma --script > prisma/migrations/0_init/migration.sql ``` Review the generated migration to ensure everything is correct. diff --git a/content/800-guides/070-cloudflare-d1.mdx b/content/800-guides/070-cloudflare-d1.mdx index 18eb78b112..548c40190b 100644 --- a/content/800-guides/070-cloudflare-d1.mdx +++ b/content/800-guides/070-cloudflare-d1.mdx @@ -227,7 +227,7 @@ For future schema changes, you can generate new migration files using: ```terminal npx prisma migrate diff \ --from-local-d1 \ - --to-schema-datamodel prisma/schema.prisma \ + --to-schema prisma/schema.prisma \ --script > migrations/0002_add_new_field.sql ```