mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 21:24:54 +08:00
11 lines
318 B
Ruby
11 lines
318 B
Ruby
|
class CreateProjectComments < ActiveRecord::Migration
|
||
|
def change
|
||
|
create_table :project_comments do |t|
|
||
|
t.integer :project_id, null: false
|
||
|
t.integer :comment_id, null: false
|
||
|
end
|
||
|
add_foreign_key :project_comments, :projects
|
||
|
add_index :project_comments, [:project_id, :comment_id]
|
||
|
end
|
||
|
end
|