Sha256: 79626c1973f397c556a010e39b387d6e67a4a34badb229dd9e84eb6d14603f54

Contents?: true

Size: 343 Bytes

Versions: 2

Compression:

Stored size: 343 Bytes

Contents

class <%= class_name %> < ActiveRecord::Migration
  def self.up
<% if model -%>
    create_table :<%= table_name %> do |t|
<% attributes.each do |name, type| -%>
      t.<%= name %> :<%= type %> 
<% end -%>
  
      t.timestamps
    end
<% end -%> 
  end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
merb_activerecord-0.9.4 lib/generators/templates/migration/schema/migrations/%file_name%.rb
merb_activerecord-0.9.5 lib/generators/templates/migration/schema/migrations/%file_name%.rb