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