porkchopclub/porkchop

View on GitHub
db/migrate/20150209070158_create_points.rb

Summary

Maintainability
A
0 mins
Test Coverage
class CreatePoints < ActiveRecord::Migration
  def change
    create_table :points do |t|
      t.references :match, index: true
      t.references :victor, index: true

      t.timestamps null: false
    end
    add_foreign_key :points, :matches
    add_foreign_key :points, :players, column: :victor_id
  end
end