scinote-web/db/migrate/20150716060140_create_result_comments.rb

11 lines
316 B
Ruby
Raw Normal View History

2017-06-30 16:23:28 +08:00
class CreateResultComments < ActiveRecord::Migration[4.2]
2016-02-12 23:52:43 +08:00
def change
create_table :result_comments do |t|
t.integer :result_id, null: false
t.integer :comment_id, null: false
end
add_foreign_key :result_comments, :results
add_index :result_comments, [:result_id, :comment_id]
end
end