Class/Module Index [+]

Quicksearch

Sequel::MigrationDSL

Internal class used by the Sequel.migration DSL, part of the migration extension.

Attributes

migration[R]

The underlying Migration class.

Public Class Methods

create(&block) click to toggle source
# File lib/sequel/extensions/migration.rb, line 86
def self.create(&block)
  new(&block).migration
end
new(&block) click to toggle source

Create a new migration class, and instance_eval the block.

# File lib/sequel/extensions/migration.rb, line 91
def initialize(&block)
  @migration = SimpleMigration.new
  Migration.descendants << migration
  instance_eval(&block)
end

Public Instance Methods

down(&block) click to toggle source

Defines the migration’s down action.

# File lib/sequel/extensions/migration.rb, line 98
def down(&block)
  migration.down = block
end
up(&block) click to toggle source

Defines the migration’s up action.

# File lib/sequel/extensions/migration.rb, line 103
def up(&block)
  migration.up = block
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.