Sha256: 477d8efd6bb98af4738288172a2c0ef11baf686bff0f1c2df14487951d68a3ff

Contents?: true

Size: 351 Bytes

Versions: 45

Compression:

Stored size: 351 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration
  def self.up
    create_table :<%= table_name %> do |t|
<% for attribute in attributes -%>
      t.<%= attribute.type %> :<%= attribute.name %>
<% end -%>
<% if options[:timestamps] %>
      t.timestamps
<% end -%>
    end
  end

  def self.down
    drop_table :<%= table_name %>
  end
end

Version data entries

45 entries across 45 versions & 3 rubygems

Version Path
activerecord-3.0.0.rc lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.0.beta4 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.0.beta3 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.0.beta2 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.0.beta lib/generators/active_record/model/templates/migration.rb