+
+ create_table :issue_comments do |t|
+ t.integer :issue_id, :null => false
+ t.integer :user_id, :null => false
+ t.text :body, :null => false
+ t.timestamps :null => false
+ end
+
+ add_foreign_key :issue_comments, :issues, :name => "issue_comments_issue_id_fkey", :on_delete => :cascade
+ add_foreign_key :issue_comments, :users, :column => :user_id, :name => "issue_comments_user_id", :on_delete => :cascade
+
+ add_index :issue_comments, :user_id
+ add_index :issue_comments, :issue_id