Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
15
lib/generators/redmine_plugin_model/templates/migration.rb
Normal file
15
lib/generators/redmine_plugin_model/templates/migration.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class <%= @migration_class_name %> < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :<%= @table_name %> do |t|
|
||||
<% attributes.each do |attribute| -%>
|
||||
t.<%= attribute.type %> :<%= attribute.name %><%= attribute.inject_options %>
|
||||
<% end -%>
|
||||
<% if options[:timestamps] %>
|
||||
t.timestamps
|
||||
<% end -%>
|
||||
end
|
||||
<% attributes_with_index.each do |attribute| -%>
|
||||
add_index :<%= table_name %>, :<%= attribute.index_name %><%= attribute.inject_index_options %>
|
||||
<% end -%>
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue