File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,14 @@ It is suggested that the version number of corresponding `up` and `down` migrati
44
44
files be equivalent for clarity, but they are allowed to differ so long as the
45
45
relative ordering of the migrations is preserved.
46
46
47
- The migration files are permitted to be empty, so in the event that a migration
48
- is a no-op or is irreversible, it is recommended to still include both migration
49
- files, and either leaving them empty or adding a comment as appropriate.
47
+ The migration files are permitted to be "empty", in the event that a migration
48
+ is a no-op or is irreversible. It is recommended to still include both migration
49
+ files by making the whole migration file consist of a comment.
50
+ If your database does not support comments, then deleting the migration file will also work.
51
+ Note, an actual empty file (e.g. a 0 byte file) may cause issues with your database since migrate
52
+ will attempt to run an empty query. In this case, deleting the migration file will also work.
53
+ For the rational of this behavior see:
54
+ [ #244 (comment)] ( https://github.com/golang-migrate/migrate/issues/244#issuecomment-510758270 )
50
55
51
56
## Migration Content Format
52
57
You can’t perform that action at this time.
0 commit comments