Sha256: 3a510c64bd99c26879a9504bc46aabd00e27145d1e7587f32f868d8005da21d7

Contents?: true

Size: 354 Bytes

Versions: 287

Compression:

Stored size: 354 Bytes

Contents

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

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

Version data entries

287 entries across 259 versions & 41 rubygems

Version Path
trusty-cms-3.0.11 lib/generators/extension_model/templates/migration.rb
trusty-cms-3.0.10 lib/generators/extension_model/templates/migration.rb
trusty-cms-3.0.9 lib/generators/extension_model/templates/migration.rb
trusty-cms-3.0.8 lib/generators/extension_model/templates/migration.rb
trusty-cms-3.0.7 lib/generators/extension_model/templates/migration.rb
trusty-cms-2.0.28 lib/generators/extension_model/templates/migration.rb
trusty-cms-3.0.6 lib/generators/extension_model/templates/migration.rb
trusty-cms-2.0.27 lib/generators/extension_model/templates/migration.rb
trusty-cms-3.0.4 lib/generators/extension_model/templates/migration.rb
trusty-cms-3.0.3 lib/generators/extension_model/templates/migration.rb
trusty-cms-3.0.2 lib/generators/extension_model/templates/migration.rb
trusty-cms-3.0.1 lib/generators/extension_model/templates/migration.rb
trusty-cms-3.0.0 lib/generators/extension_model/templates/migration.rb
trusty-cms-2.0.26 lib/generators/extension_model/templates/migration.rb
trusty-cms-2.0.25 lib/generators/extension_model/templates/migration.rb
trusty-cms-2.0.24 lib/generators/extension_model/templates/migration.rb
trusty-cms-2.0.23 lib/generators/extension_model/templates/migration.rb
trusty-cms-2.0.22 lib/generators/extension_model/templates/migration.rb
trusty-cms-2.0.21 lib/generators/extension_model/templates/migration.rb
trusty-cms-2.0.21.alpha lib/generators/extension_model/templates/migration.rb