]> git.openstreetmap.org Git - rails.git/blob - db/migrate/010_diary_comments.rb
Update Potlatch 2 to 0.5-294-g58c9d2c build
[rails.git] / db / migrate / 010_diary_comments.rb
1 require 'lib/migrate'
2
3 class DiaryComments < ActiveRecord::Migration
4   def self.up
5     create_table "diary_comments", myisam_table do |t|
6       t.column "id",             :bigint_pk,              :null => false
7       t.column "diary_entry_id", :bigint,   :limit => 20, :null => false
8       t.column "user_id",        :bigint,   :limit => 20, :null => false
9       t.column "body",           :text,                   :null => false
10       t.column "created_at",     :datetime,               :null => false
11       t.column "updated_at",     :datetime,               :null => false
12     end
13
14     add_index "diary_comments", ["diary_entry_id", "id"], :name => "diary_comments_entry_id_idx", :unique => true
15
16   end
17
18   def self.down
19     drop_table "diary_comments"
20   end
21 end