-
-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lifted from our [dotfiles][], this task runs the latest migration, rolls it back, and runs it again in an effort to ensure it's reversible. More context can be found [in these comments][]. Unfortunately, this implementation did not work because Rake recognized that it `db:migrate` was already invoked, so it wasn't invoked a second time. Instead, we needed to `reenable` the task manually. ```ruby task migrate: ["db:migrate", "db:rollback", "db:migrate", "db:test:prepare"] ``` [dotfiles]: https://github.com/thoughtbot/dotfiles/blob/f149484269ef98e2bc80b7daa1988e214ddf8e8b/aliases#L12 [in these comments]: thoughtbot/dotfiles@4882c41#r1933964
- Loading branch information
1 parent
63fa9cd
commit a25ddf6
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters