Class | Sequel::SimpleMigration
In: | lib/sequel/extensions/migration.rb
Parent: | Object

Migration class used by the Sequel.migration DSL, using instances for each migration, unlike the `Migration` class, which uses subclasses for each migration. Part of the `migration` extension.

### Methods

apply

### Attributes

down | [RW] | Proc used for the down action
up | [RW] | Proc used for the up action

### Public Instance methods

apply(db, direction)

Apply the appropriate block on the `Database` instance using instance_eval.

[Source]

        # File lib/sequel/extensions/migration.rb, line 73
    73:     def apply(db, direction)
    74:       raise(ArgumentError, "Invalid migration direction specified (#{direction.inspect})") unless [:up, :down].include?(direction)
    75:       if prok = send(direction)
    76:         db.instance_eval(&prok)
    77:       end
    78:     end

[Validate]