1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
class CreateComments < ActiveRecord::Migration def self.up create_table :comments do |t| t.integer :user_id t.integer :glsa_id t.text :text t.string :type t.boolean :read, :default => false t.timestamps end add_index :comments, :glsa_id end def self.down drop_table :comments end end