porkchopclub/porkchop

View on GitHub
db/migrate/20150525213933_create_season_memberships.rb

Summary

Maintainability
A
25 mins
Test Coverage
class CreateSeasonMemberships < ActiveRecord::Migration
  def change
    create_table :season_memberships do |t|
      t.references :player, index: true
      t.references :season, index: true

      t.timestamps null: false
    end
    add_foreign_key :season_memberships, :players
    add_foreign_key :season_memberships, :seasons
  end
end