Files
euchre_camp/db/migrate/20240915000000_create_good_job_tables.rb
T
david 1268889a78 Add Elo rating system with match entry and CSV upload
- Implement EloCalculator service for 2v2 Euchre matches
- Create background job processing with GoodJob
- Add single match entry form
- Add CSV upload for batch match entry
- Create player rankings view
- Add database schema for matches and elo snapshots
2026-03-26 16:28:24 -07:00

54 lines
1.5 KiB
Ruby

# frozen_string_literal: true
ROM::SQL.migration do
change do
create_table :good_jobs do
primary_key :id
column :queue_name, String
column :priority, Integer, default: 0
column :serialized_params, String
column :scheduled_at, DateTime
column :performed_at, DateTime
column :finished_at, DateTime
column :error, String
column :created_at, DateTime, null: false
column :updated_at, DateTime, null: false
column :active_job_id, String
column :concurrency_key, String
column :sequence, Integer
column :executions_count, Integer
column :job_class, String
column :error_event, Integer
column :labels, String
column :locked_by_id, String
column :locked_at, DateTime
end
add_index :good_jobs, [:scheduled_at, :priority, :id], name: "index_good_jobs_on_scheduled_at"
create_table :good_job_processes do
primary_key :id
column :state, String
column :started_at, DateTime
column :singleton_key, String
column :created_at, DateTime, null: false
column :updated_at, DateTime, null: false
end
create_table :good_job_execution_errors do
primary_key :id
column :active_job_id, String
column :error, String
column :created_at, DateTime, null: false
end
create_table :good_job_settings do
primary_key :id
column :key, String
column :value, String
column :created_at, DateTime, null: false
column :updated_at, DateTime, null: false
end
end
end