2007-01-22 14:43:50 +01:00
|
|
|
class <%= migration_name %> < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
create_table :<%= table_name %> do |t|
|
2007-02-09 09:04:31 +01:00
|
|
|
<% for attribute in attributes -%>
|
2007-12-21 08:48:59 +01:00
|
|
|
t.<%= attribute.type %> :<%= attribute.name %>
|
|
|
|
<% end -%>
|
|
|
|
<% unless options[:skip_timestamps] %>
|
|
|
|
t.timestamps
|
2007-02-09 09:04:31 +01:00
|
|
|
<% end -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
drop_table :<%= table_name %>
|
|
|
|
end
|
|
|
|
end
|