class Sequel::MigrationAlterTableReverser

Handles reversing an alter_table block in a reversible migration.

Public Class Methods

new() click to toggle source
    # File lib/sequel/extensions/migration.rb
245 def initialize
246   @actions = []
247 end

Public Instance Methods

reverse(&block) click to toggle source
    # File lib/sequel/extensions/migration.rb
249 def reverse(&block)
250   instance_exec(&block)
251   actions = @actions.reverse
252   # Allow calling private methods as the reversing methods are private
253   Proc.new{actions.each{|a| send(*a)}}
254 end