mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-06 22:44:14 +00:00
Moved match generation to a class and added tournament_type to tournaments.
This commit is contained in:
5
db/migrate/20150427163325_add_type_to_tournament.rb
Normal file
5
db/migrate/20150427163325_add_type_to_tournament.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddTypeToTournament < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :tournaments, :type, :text
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
class RenameTypeToTournamentType < ActiveRecord::Migration
|
||||
def change
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class RenameTypeToTournamentTypeForReal < ActiveRecord::Migration
|
||||
def change
|
||||
rename_column :tournaments, :type, :tournament_type
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150426195714) do
|
||||
ActiveRecord::Schema.define(version: 20150427163818) do
|
||||
|
||||
create_table "matches", force: :cascade do |t|
|
||||
t.integer "w1"
|
||||
@@ -55,6 +55,7 @@ ActiveRecord::Schema.define(version: 20150426195714) do
|
||||
t.string "director_email"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.text "tournament_type"
|
||||
end
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# Mayor.create(name: 'Emanuel', city: cities.first)
|
||||
if Rails.env.development?
|
||||
User.create(email: 'test@test.com', password: 'password', password_confirmation: 'password')
|
||||
Tournament.create(id: 200, name: 'test', address: 'some place', director: 'some guy', director_email: 'hismail@email.com')
|
||||
Tournament.create(id: 200, name: 'test', address: 'some place', director: 'some guy', director_email: 'hismail@email.com', tournament_type: 'Pool to bracket')
|
||||
School.create(id: 200, name: 'Central Crossing', tournament_id: 200)
|
||||
School.create(id: 201, name: 'Turd Town', tournament_id: 200)
|
||||
School.create(id: 202, name: 'Shit Show', tournament_id: 200)
|
||||
|
||||
Reference in New Issue
Block a user