scinote-web/db/migrate/20150715131400_create_project_comments.rb
2017-06-30 10:23:28 +02:00

11 lines
323 B
Ruby

class CreateProjectComments < ActiveRecord::Migration[4.2]
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