1 class CreateIssueComments < ActiveRecord::Migration
3 create_table :issue_comments do |t|
5 t.integer :commenter_user_id
8 t.timestamps :null => false
11 add_foreign_key :issue_comments, :issues, :name => "issue_comments_issue_id_fkey", :on_delete => :cascade
12 add_foreign_key :issue_comments, :users, :column => :commenter_user_id, :name => "issue_comments_commenter_user_id", :on_delete => :cascade
14 add_index :issue_comments, :commenter_user_id
15 add_index :issue_comments, :issue_id