Creating Irreversible Migrations in Rails

This is not something I do very often (or that I recommend at all), but when you need to mark a migration as irreversible, this is how you would do it.

class Example < ActiveRecord::Migration
  def up
    # Make your change

  end

  def down
    raise ActiveRecord::IrreversibleMigration
  end
end

Again, use with care. Happy coding.