hensei-api/db/migrate/20251204070959_create_crew_gw_participations.rb
Justin Edmund f2a058b6b2 add GW events and scoring system
- create gw_events, crew_gw_participations, gw_crew_scores, gw_individual_scores
- add models, blueprints, controllers for GW tracking
- add model specs and gw_events controller specs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:34:54 -08:00

16 lines
493 B
Ruby

# frozen_string_literal: true
class CreateCrewGwParticipations < ActiveRecord::Migration[8.0]
def change
create_table :crew_gw_participations, id: :uuid do |t|
t.references :crew, type: :uuid, null: false, foreign_key: true
t.references :gw_event, type: :uuid, null: false, foreign_key: true
t.bigint :preliminary_ranking
t.bigint :final_ranking
t.timestamps
end
add_index :crew_gw_participations, %i[crew_id gw_event_id], unique: true
end
end