How to deal with migrations that depend on gems

I have a project that was going to use Paperclip, and then we removed it because it turned out not to be necessary. However, this presents a problem when running old migrations, as there’s a migration that requires the attachment column type to exist in order to run.

I know you’re never supposed to modify a migration that’s been executed and checked in to version control. What’s the best way to deal with this kind of issue going forward?