mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-08 00:23:01 +08:00
11 lines
311 B
Ruby
11 lines
311 B
Ruby
|
class CreateResultComments < ActiveRecord::Migration
|
||
|
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
|