class Sequel::MigrationDSL
Internal class used by the Sequel.migration DSL, part of the migration extension.
def self.create(&block)
def self.create(&block) new(&block).migration end
def change(&block)
There are no guarantees that this will work perfectly
the block.
to create a +down+ block that will reverse the changes made by
the same block with +up+, but it also calls the block and attempts
Creates a reversible migration. This is the same as creating
def change(&block) migration.up = block migration.down = MigrationReverser.new.reverse(&block) end
def down(&block)
def down(&block) migration.down = block end
def initialize(&block)
def initialize(&block) @migration = SimpleMigration.new Migration.descendants << migration instance_eval(&block) end
def no_transaction
def no_transaction migration.use_transactions = false end
def up(&block)
def up(&block) migration.up = block end