- 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>
16 lines
493 B
Ruby
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
|