Chris@1295: class <%= @migration_class_name %> < ActiveRecord::Migration Chris@1295: def change Chris@1295: create_table :<%= @table_name %> do |t| Chris@1295: <% attributes.each do |attribute| -%> Chris@1295: t.<%= attribute.type %> :<%= attribute.name %><%= attribute.inject_options %> Chris@1295: <% end -%> Chris@1295: <% if options[:timestamps] %> Chris@1295: t.timestamps Chris@1295: <% end -%> Chris@1295: end Chris@1295: <% attributes_with_index.each do |attribute| -%> Chris@1295: add_index :<%= table_name %>, :<%= attribute.index_name %><%= attribute.inject_index_options %> Chris@1295: <% end -%> Chris@1295: end Chris@1295: end