]> git.openstreetmap.org Git - rails.git/blob - db/migrate/010_diary_comments.rb
Fix rubocop warnings
[rails.git] / db / migrate / 010_diary_comments.rb
1 require "migrate"
2
3 class DiaryComments < ActiveRecord::Migration
4   def self.up
5     create_table "diary_comments", :id => false do |t|
6       t.column "id",             :bigserial, :primary_key => true, :null => false
7       t.column "diary_entry_id", :bigint, :null => false
8       t.column "user_id",        :bigint, :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", %w(diary_entry_id id), :name => "diary_comments_entry_id_idx", :unique => true
15   end
16
17   def self.down
18     drop_table "diary_comments"
19   end
20 end