OSDN Git Service
(root)
/
redminele
/
redminele.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
2a305a6a9d7b1a47c79336e4b329b791e4e02bd1
[redminele/redminele.git]
/
redmine
/
lib
/
generators
/
redmine_plugin_model
/
templates
/
migration.rb.erb
1
class <%= migration_name %> < ActiveRecord::Migration
2
def self.up
3
create_table :<%= table_name %> do |t|
4
<% for attribute in attributes -%>
5
t.column :<%= attribute.name %>, :<%= attribute.type %>
6
<% end -%>
7
end
8
end
9
10
def self.down
11
drop_table :<%= table_name %>
12
end
13
end