annotate .svn/pristine/31/31fa3914a91d4720d86c081f871b079fae9c31a5.svn-base @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 622f24f53b42
children
rev   line source
Chris@1295 1 class <%= @migration_class_name %> < ActiveRecord::Migration
Chris@1295 2 def change
Chris@1295 3 create_table :<%= @table_name %> do |t|
Chris@1295 4 <% attributes.each do |attribute| -%>
Chris@1295 5 t.<%= attribute.type %> :<%= attribute.name %><%= attribute.inject_options %>
Chris@1295 6 <% end -%>
Chris@1295 7 <% if options[:timestamps] %>
Chris@1295 8 t.timestamps
Chris@1295 9 <% end -%>
Chris@1295 10 end
Chris@1295 11 <% attributes_with_index.each do |attribute| -%>
Chris@1295 12 add_index :<%= table_name %>, :<%= attribute.index_name %><%= attribute.inject_index_options %>
Chris@1295 13 <% end -%>
Chris@1295 14 end
Chris@1295 15 end