1 class <%= migration_name %> < ActiveRecord::Migration 2 def self.up 3 create_table :<%= table_name %> do |t| 4 <% for attribute in attributes -%> 5 t.<%= attribute.type %> :<%= attribute.name %> 6 <% end -%> 7 <% unless options[:skip_timestamps] %> 8 t.timestamps 9 <% end -%> 10 end 11 end 12 13 def self.down 14 drop_table :<%= table_name %> 15 end 16 end