Worlds Bets
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
sto
2026-09-06 10:07:47 +02:00
parent 49e49dc93d
commit dae86bd1ea
33 changed files with 1337 additions and 1 deletions

View 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

View 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

View File

@@ -0,0 +1,5 @@
class AddRoundToWorldParticipant < ActiveRecord::Migration[8.0]
def change
add_column :world_participants, :round, :string, null: false
end
end

View 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

View File

@@ -0,0 +1,5 @@
class AddScoreToWorldParticipant < ActiveRecord::Migration[8.0]
def change
add_column :world_participants, :score, :integer
end
end

View File

@@ -0,0 +1,5 @@
class AddWorldScoreToWorldBet < ActiveRecord::Migration[8.0]
def change
add_column :world_bets, :world_score, :integer
end
end

View File

@@ -0,0 +1,5 @@
class AddFrenchScoreToWorldBet < ActiveRecord::Migration[8.0]
def change
add_column :world_bets, :french_score, :integer
end
end

34
db/schema.rb generated
View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2026_08_25_071844) do
ActiveRecord::Schema[8.0].define(version: 2026_09_05_120106) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -203,6 +203,37 @@ ActiveRecord::Schema[8.0].define(version: 2026_08_25_071844) do
t.index ["email_address"], name: "index_users_on_email_address", unique: true
end
create_table "world_bets", force: :cascade do |t|
t.string "name"
t.string "bet"
t.integer "score"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "world_score"
t.integer "french_score"
end
create_table "world_countries", force: :cascade do |t|
t.string "name", null: false
t.string "code", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "world_participants", force: :cascade do |t|
t.string "username", null: false
t.string "name", null: false
t.integer "world_country_id", null: false
t.integer "qualifier_result"
t.integer "semifinal_result"
t.integer "final_result"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "round", null: false
t.integer "score"
t.index ["world_country_id"], name: "index_world_participants_on_world_country_id"
end
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "categories", "contests"
@@ -220,4 +251,5 @@ ActiveRecord::Schema[8.0].define(version: 2026_08_25_071844) do
add_foreign_key "offlines", "contests"
add_foreign_key "puzzles", "contests"
add_foreign_key "sessions", "users"
add_foreign_key "world_participants", "world_countries"
end