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: sqlx-cli/README.md
+4-6
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ sqlx migrate info --source ../relative/migrations
72
72
73
73
### Reverting Migrations
74
74
75
-
If you would like to create _reversible_ migrations with corresponding "up" and "down" scripts, you use the `-r` flag when creating new migrations:
75
+
If you would like to create _reversible_ migrations with corresponding "up" and "down" scripts, you use the `-r` flag when creating the first migration:
76
76
77
77
```bash
78
78
$ sqlx migrate add -r <name>
@@ -94,14 +94,12 @@ $ sqlx migrate revert
94
94
Applied 20211001154420/revert <name>
95
95
```
96
96
97
-
**Note**: attempting to mix "simple" migrations with reversible migrations with result in an error.
97
+
**Note**: All the subsequent migrations will be reversible as well.
98
98
99
99
```bash
100
100
$ sqlx migrate add <name1>
101
-
Creating migrations/20211001154420_<name>.sql
102
-
103
-
$ sqlx migrate add -r <name2>
104
-
error: cannot mix reversible migrations with simple migrations. All migrations should be reversible or simple migrations
0 commit comments