Worlds Bets
This commit is contained in:
10
db/migrate/20260904063514_create_world_countries.rb
Normal file
10
db/migrate/20260904063514_create_world_countries.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateWorldCountries < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :world_countries do |t|
|
||||
t.string :name, null: false
|
||||
t.string :code, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
14
db/migrate/20260904063926_create_world_participants.rb
Normal file
14
db/migrate/20260904063926_create_world_participants.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateWorldParticipants < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :world_participants do |t|
|
||||
t.string :username, null: false
|
||||
t.string :name, null: false
|
||||
t.belongs_to :world_country, null: false, foreign_key: true
|
||||
t.integer :qualifier_result
|
||||
t.integer :semifinal_result
|
||||
t.integer :final_result
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddRoundToWorldParticipant < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :world_participants, :round, :string, null: false
|
||||
end
|
||||
end
|
||||
11
db/migrate/20260904131402_create_world_bets.rb
Normal file
11
db/migrate/20260904131402_create_world_bets.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateWorldBets < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :world_bets do |t|
|
||||
t.string :name
|
||||
t.string :bet
|
||||
t.integer :score
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddScoreToWorldParticipant < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :world_participants, :score, :integer
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddWorldScoreToWorldBet < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :world_bets, :world_score, :integer
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddFrenchScoreToWorldBet < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :world_bets, :french_score, :integer
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user