Skip to content

Commit 41d17c8

Browse files
Update rollback.md
1 parent 0594576 commit 41d17c8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/getting-started/how-to-use/rollback.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,34 @@ The `migrate:actions:reset` command will roll back all of your application's mig
1818
php artisan migrate:actions:reset
1919
```
2020

21+
For example:
22+
23+
```bash
24+
php artisan migrate:actions:rollback
25+
# action batch
26+
# 2022_10_12_021837_some 1
27+
# 2022_10_12_021838_some 2
28+
# 2022_10_12_021839_some 2
29+
# 2022_10_12_021840_some 3 // will be canceled
30+
# 2022_10_12_021841_some 3 // will be canceled
31+
32+
php artisan migrate:actions:rollback --step=1
33+
# action batch
34+
# 2022_10_12_021837_some 1
35+
# 2022_10_12_021838_some 2
36+
# 2022_10_12_021839_some 2
37+
# 2022_10_12_021840_some 3 // will be canceled
38+
# 2022_10_12_021841_some 3 // will be canceled
39+
40+
php artisan migrate:actions:rollback --step=2
41+
# action batch
42+
# 2022_10_12_021837_some 1
43+
# 2022_10_12_021838_some 2 // will be canceled
44+
# 2022_10_12_021839_some 2 // will be canceled
45+
# 2022_10_12_021840_some 3 // will be canceled
46+
# 2022_10_12_021841_some 3 // will be canceled
47+
```
48+
2149
## Roll Back & Action Using A Single Command
2250

2351
The `migrate:actions:refresh` command will roll back all of your migrations and then execute the `migrate:actions` command. This command effectively re-creates your entire

0 commit comments

Comments
 (0)