Handles reversing an alter_table block in a reversible migration.
Public Class methods
new()
[show source]
# File lib/sequel/extensions/migration.rb 232 def initialize 233 @actions = [] 234 end
Public Instance methods
reverse(&block)
[show source]
# File lib/sequel/extensions/migration.rb 236 def reverse(&block) 237 instance_exec(&block) 238 actions = @actions.reverse 239 # Allow calling private methods as the reversing methods are private 240 Proc.new{actions.each{|a| send(*a)}} 241 end