Skip to content

Commit 9a44ec6

Browse files
authored
fix: docs: 70-patching-and-hotfixing.mdx: add npx
npx was sometimes used, sometimes not, but I believe npx is the good practive
1 parent 54a4b35 commit 9a44ec6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ To reconcile your migration history and database schema in production:
5555
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:
5656

5757
```terminal
58-
prisma migrate resolve --applied "20201127134938-retroactively-add-index"
58+
npx prisma migrate resolve --applied "20201127134938-retroactively-add-index"
5959
```
6060

6161
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
9191
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:
9292

9393
```terminal
94-
prisma migrate resolve --rolled-back "20201127134938_added_bio_index"
94+
npx prisma migrate resolve --rolled-back "20201127134938_added_bio_index"
9595
```
9696

9797
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
106106
1. Re-deploy the migration:
107107

108108
```terminal
109-
prisma migrate deploy
109+
npx prisma migrate deploy
110110
```
111111

112112
### 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
118118
1. Resolve the migration as applied - this tells Prisma Migrate to consider the migration successfully applied:
119119

120120
```terminal
121-
prisma migrate resolve --applied "20201127134938_my_migration"
121+
npx prisma migrate resolve --applied "20201127134938_my_migration"
122122
```
123123

124124
## Fixing failed migrations with `migrate diff` and `db execute`
@@ -160,7 +160,7 @@ model Post {
160160
}
161161
```
162162

163-
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.
163+
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.
164164

165165
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:
166166

0 commit comments

Comments
 (0)