--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new migration, and adds it to the list of migrations to be run. Migrations can be defined in any order, they will be sorted and run in the correct order.
- !ruby/struct:SM::Flow::P 
  body: The order that migrations are run in is set by the first argument. It is not neccessary that this be unique; migrations with the same version number are expected to be able to be run in any order.
- !ruby/struct:SM::Flow::P 
  body: The second argument is the name of the migration. This name is used internally to track if the migration has been run. It is required that this name be unique across all migrations.
- !ruby/struct:SM::Flow::P 
  body: "Addtionally, it accepts a number of options:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:database</tt> If you defined several DataMapper::database instances use this to choose which one to run the migration gagainst. Defaults to <tt>:default</tt>. Migrations are tracked individually per database.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:verbose</tt> true/false, defaults to true. Determines if the migration should output its status messages when it runs.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Example of a simple migration:"
- !ruby/struct:SM::Flow::VERB 
  body: "  migration( 1, :create_people_table ) do\n    up do\n      create_table :people do\n        column :id,   Integer, :serial =&gt; true\n        column :name, String, :size =&gt; 50\n        column :age,  Integer\n      end\n    end\n    down do\n      drop_table :people\n    end\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: Its recommended that you stick with raw SQL for migrations that manipulate data. If you write a migration using a model, then later change the model, there's a possibility the migration will no longer work. Using SQL will always work.
full_name: DataMapper::MigrationRunner#migration
is_singleton: false
name: migration
params: ( number, name, opts = {}, &block )
visibility: public
