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