You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started/how-to-use/rollback.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,34 @@ The `migrate:actions:reset` command will roll back all of your application's mig
18
18
php artisan migrate:actions:reset
19
19
```
20
20
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
+
21
49
## Roll Back & Action Using A Single Command
22
50
23
51
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