instiki/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
Jacques Distler c358389f25 TeX and CSS tweaks.
Sync with latest Instiki Trunk
(Updates Rails to 1.2.2)
2007-02-09 02:04:31 -06:00

14 lines
294 B
Ruby

class <%= migration_name %> < ActiveRecord::Migration
def self.up
create_table :<%= table_name %> do |t|
<% for attribute in attributes -%>
t.column :<%= attribute.name %>, :<%= attribute.type %>
<% end -%>
end
end
def self.down
drop_table :<%= table_name %>
end
end