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.20 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.19 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.18 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.17 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.16 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.15 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.14 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.13 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.13.rc1 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.12 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.12.rc1 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.11 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.10 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.10.rc1 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.9 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.9.rc5 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.9.rc4 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.9.rc3 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.9.rc1 lib/rails/generators/active_record/model/templates/migration.rb
activerecord-3.0.8 lib/rails/generators/active_record/model/templates/migration.rb