1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-04 13:43:48 +00:00

Added a separate table to record background job status for tournaments and fixed migrations/schemas for solid dbs

This commit is contained in:
2025-04-15 13:31:58 -04:00
parent 4828d9b876
commit 71411ff6f8
25 changed files with 483 additions and 1076 deletions

View File

@@ -0,0 +1,15 @@
class CreateTournamentJobStatuses < ActiveRecord::Migration[8.0]
def change
create_table :tournament_job_statuses do |t|
t.bigint :tournament_id, null: false
t.string :job_name, null: false
t.string :status, null: false, default: "Queued" # Queued, Running, Errored
t.text :details # Additional details about the job (e.g., wrestler name, school name)
t.timestamps
end
add_index :tournament_job_statuses, :tournament_id
add_index :tournament_job_statuses, [:tournament_id, :job_name]
add_foreign_key :tournament_job_statuses, :tournaments
end
end