Handles reversing an alter_table block in a reversible migration.
Public Class methods
new()
[show source]
# File lib/sequel/extensions/migration.rb 242 def initialize 243 @actions = [] 244 end
Public Instance methods
reverse(&block)
[show source]
# File lib/sequel/extensions/migration.rb 246 def reverse(&block) 247 instance_exec(&block) 248 actions = @actions.reverse 249 # Allow calling private methods as the reversing methods are private 250 Proc.new{actions.each{|a| send(*a)}} 251 end