Class DataMapper::Migration
In: lib/dm-migrations/migration.rb
lib/dm-migrations/version.rb
Parent: Object

Methods

Included Modules

SQL

Constants

VERSION = '0.10.1'.freeze

Attributes

adapter  [RW] 
database  [RW] 
name  [RW] 
position  [RW] 

Public Class methods

Public Instance methods

Orders migrations by position, so we know what order to run them in. First order by postition, then by name, so at least the order is predictable.

define the actions that should be performed on a down migration

Quoted table name, for the adapter

Quoted `migration_name` column, for the adapter

Fetch the record for this migration out of the migration_info table

True if the migration has already been run

True if the migration needs to be run

un-do the migration by running the code in the down block

perform the migration by running the code in the up block

Quote the name of the migration for use in SQL

Output some text. Optional indent level

Time how long the block takes to run, and output it with the message.

define the actions that should be performed on an up migration

Inserts or removes a row into the `migration_info` table, so we can mark this migration as run, or un-done

output the given text, but only if verbose mode is on

[Validate]