Handles reversing an alter_table block in a reversible migration.
Public Class methods
new()
[show source]
# File lib/sequel/extensions/migration.rb 245 def initialize 246 @actions = [] 247 end
Public Instance methods
reverse(&block)
[show 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