]> git.openstreetmap.org Git - rails.git/blob - db/migrate/010_diary_comments.rb
fix indentation. Get teh api version from the constant, rather than hard coding it...
[rails.git] / db / migrate / 010_diary_comments.rb
1 class DiaryComments < ActiveRecord::Migration
2   def self.up
3     create_table "diary_comments", myisam_table do |t|
4       t.column "id",             :bigint,   :limit => 20, :null => false
5       t.column "diary_entry_id", :bigint,   :limit => 20, :null => false
6       t.column "user_id",        :bigint,   :limit => 20, :null => false
7       t.column "body",           :text,                   :null => false
8       t.column "created_at",     :datetime,               :null => false
9       t.column "updated_at",     :datetime,               :null => false
10     end
11
12     add_primary_key "diary_comments", ["id"]
13     add_index "diary_comments", ["diary_entry_id", "id"], :name => "diary_comments_entry_id_idx", :unique => true
14
15     change_column "diary_comments", "id", :bigint, :limit => 20, :null => false, :options => "AUTO_INCREMENT"
16   end
17
18   def self.down
19     drop_table "diary_comments"
20   end
21 end