class Sequel::MigrationAlterTableReverser

  1. lib/sequel/extensions/migration.rb
Superclass: Sequel::BasicObject

Handles reversing an alter_table block in a reversible migration.

Methods

Public Class

  1. new

Public Instance

  1. reverse

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