Import gender tees + front/back split ratings; front/back/9 hole selection
Course import now fetches both male and female tees, each with their own per-tee stroke indices extracted from the holes array. Front and back 9 slope/rating are stored per tee for more accurate WHS handicap calculation. New game creation replaces the 9/18 radio with a course-aware selector: 18-hole courses offer 18 holes, Front 9, or Back 9; 9-hole courses auto- select. start_hole is stored on the game and used throughout scoring, handicap calculation, and scorecard rendering. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -128,6 +128,13 @@ async def init_db():
|
||||
"ALTER TABLE games ADD COLUMN skin_double_back_nine INTEGER NOT NULL DEFAULT 0",
|
||||
"ALTER TABLE games ADD COLUMN skins_net INTEGER NOT NULL DEFAULT 0",
|
||||
"ALTER TABLE games ADD COLUMN side_skins_enabled INTEGER NOT NULL DEFAULT 0",
|
||||
"ALTER TABLE games ADD COLUMN start_hole INTEGER NOT NULL DEFAULT 1",
|
||||
"ALTER TABLE course_tees ADD COLUMN gender TEXT",
|
||||
"ALTER TABLE course_tees ADD COLUMN stroke_indices TEXT",
|
||||
"ALTER TABLE course_tees ADD COLUMN front_slope INTEGER",
|
||||
"ALTER TABLE course_tees ADD COLUMN front_rating REAL",
|
||||
"ALTER TABLE course_tees ADD COLUMN back_slope INTEGER",
|
||||
"ALTER TABLE course_tees ADD COLUMN back_rating REAL",
|
||||
]:
|
||||
try:
|
||||
await db.execute(migration)
|
||||
|
||||
Reference in New Issue
Block a user