File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 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
4444files be equivalent for clarity, but they are allowed to differ so long as the
4545relative ordering of the migrations is preserved.
4646
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 )
5055
5156## Migration Content Format
5257
You can’t perform that action at this time.
0 commit comments