Sha256: a8ba3656a66430b205c0c6255b8d6e4c6f2f734c6cab9f699d6464038cd3f2f2

Contents?: true

Size: 365 Bytes

Versions: 1

Compression:

Stored size: 365 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 -%>
      t.column :created_at, :datetime
      t.column :updated_at, :datetime
    end
  end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
newplugin-0.0.4 newplugin_generators/model/templates/migration.rb