Sha256: 904638afb8d9ca84aed7a98581355dd8d88fd716386bfe86888a0071c2145b0b

Contents?: true

Size: 355 Bytes

Versions: 7

Compression:

Stored size: 355 Bytes

Contents

class NinshoCreate<%= table_name.camelize %> < ActiveRecord::Migration
  def change
    create_table(:<%= table_name %>) do |t|
      <%= migration_data -%>

      <% attributes.each do |attribute| -%>
        t.<%= attribute.type %> :<%= attribute.name %>
      <% end -%>

      t.timestamps
    end
    add_index :<%= table_name %>, :user_id
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ninsho-0.1.3 lib/generators/active_record/templates/migration.rb
ninsho-0.1.2 lib/generators/active_record/templates/migration.rb
ninsho-0.1.1 lib/generators/active_record/templates/migration.rb
ninsho-0.1.0 lib/generators/active_record/templates/migration.rb
ninsho-0.0.3 lib/generators/active_record/templates/migration.rb
ninsho-0.0.2 lib/generators/active_record/templates/migration.rb
ninsho-0.0.1 lib/generators/active_record/templates/migration.rb