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 9f8a5addad..c9a2e6fc68 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 @@ -55,7 +55,7 @@ To reconcile your migration history and database schema in production: 1. Push the migration to production **without running `migrate deploy`**. Instead, mark the migration created in the previous step as 'already applied' so that Prisma Migrate does not attempt to apply your hotfix a second time: ```terminal - prisma migrate resolve --applied "20201127134938-retroactively-add-index" + npx prisma migrate resolve --applied "20201127134938-retroactively-add-index" ``` This command adds the migration to the migration history table without running the actual SQL. @@ -91,7 +91,7 @@ The following example demonstrates how to roll back a migration, optionally make 1. Mark the migration as rolled back - this updates the migration record in the `_prisma_migrations` table to register it as rolled back, allowing it to be applied again: ```terminal - prisma migrate resolve --rolled-back "20201127134938_added_bio_index" + npx prisma migrate resolve --rolled-back "20201127134938_added_bio_index" ``` 1. If the migration was partially run, you can either: @@ -106,7 +106,7 @@ The following example demonstrates how to roll back a migration, optionally make 1. Re-deploy the migration: ```terminal - prisma migrate deploy + npx prisma migrate deploy ``` ### Option 2: Manually complete migration and resolve as applied @@ -118,7 +118,7 @@ The following example demonstrates how to manually complete the steps of a migra 1. Resolve the migration as applied - this tells Prisma Migrate to consider the migration successfully applied: ```terminal - prisma migrate resolve --applied "20201127134938_my_migration" + npx prisma migrate resolve --applied "20201127134938_my_migration" ``` ## Fixing failed migrations with `migrate diff` and `db execute` @@ -160,7 +160,7 @@ model Post { } ``` -You create a migration called 'Unique' with the command `prisma migrate dev -n Unique` which is saved in your local migrations history. Applying the migration succeeds in your dev environment and now it is time to release to production. +You create a migration called 'Unique' with the command `npx prisma migrate dev -n Unique` which is saved in your local migrations history. Applying the migration succeeds in your dev environment and now it is time to release to production. Unfortunately this migration can only be partially executed. Creating the `Post` model and adding the `email` column succeeds, but making the `name` field unique fails with the following error: