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
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
0 commit comments