scinote-web/db/migrate/20150715131400_create_project_comments.rb

11 lines
318 B
Ruby
Raw Normal View History

2016-02-12 23:52:43 +08:00
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