mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-03 13:30:02 +00:00
Added a bout board
This commit is contained in:
6
db/migrate/20150619142023_add_mat_id_to_match.rb
Normal file
6
db/migrate/20150619142023_add_mat_id_to_match.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class AddMatIdToMatch < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :matches, :mat_id, :integer
|
||||
add_index :matches, :mat_id
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150523121319) do
|
||||
ActiveRecord::Schema.define(version: 20150619142023) do
|
||||
|
||||
create_table "matches", force: :cascade do |t|
|
||||
t.integer "w1"
|
||||
@@ -32,8 +32,10 @@ ActiveRecord::Schema.define(version: 20150523121319) do
|
||||
t.integer "bracket_position_number"
|
||||
t.string "loser1_name"
|
||||
t.string "loser2_name"
|
||||
t.integer "mat_id"
|
||||
end
|
||||
|
||||
add_index "matches", ["mat_id"], name: "index_matches_on_mat_id"
|
||||
add_index "matches", ["tournament_id"], name: "index_matches_on_tournament_id"
|
||||
add_index "matches", ["w1", "w2"], name: "index_matches_on_w1_and_w2", unique: true
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ if Rails.env.development?
|
||||
Weight.create(id: 202, max: 113, tournament_id: 200 )
|
||||
Weight.create(id: 203, max: 120, tournament_id: 200 )
|
||||
Weight.create(id: 204, max: 126, tournament_id: 200 )
|
||||
Mat.create(id: 200, name: "1", tournament_id: 200 )
|
||||
Mat.create(id: 201, name: "2", tournament_id: 200 )
|
||||
Mat.create(id: 202, name: "3", tournament_id: 200 )
|
||||
Mat.create(id: 203, name: "4", tournament_id: 200 )
|
||||
Wrestler.create(name: 'Guy 1', school_id: 200, weight_id: 200, original_seed: 1, season_win: 0, season_loss: 0, criteria: 'N/A')
|
||||
Wrestler.create(name: 'Guy 2', school_id: 201, weight_id: 200, original_seed: 2, season_win: 0, season_loss: 0, criteria: 'N/A')
|
||||
Wrestler.create(name: 'Guy 3', school_id: 202, weight_id: 200, original_seed: 3, season_win: 0, season_loss: 0, criteria: 'N/A')
|
||||
|
||||
Reference in New Issue
Block a user