teecup/050_high_low_high_round_and_session.sql

21 lines
1.3 KiB
MySQL
Raw Permalink Normal View History

-- =====================================================================
-- TeeCup — High-low-high, migrasjon 050. Siste (åttende) av de nye
-- turneringsformatene denne runden.
--
-- 2 lag à 2 spillere -- strukturelt identisk med fourball (individuell
-- ball, round_hole/hole_score keyet per SPILLER, ikke per side). INGEN
-- nye kolonner -- per-hull-rangeringen (høy/lav) og poengtellingen
-- regnes helt ved LESING (handicap_engine.py sin high_low_high_points_
-- for_hole/high_low_high_running_score), ingen cache-kolonne (samme
-- "regn ut ved lesing"-filosofi som Nassau).
-- =====================================================================
\set ON_ERROR_STOP on
ALTER TABLE round DROP CONSTRAINT round_play_format_check;
ALTER TABLE round ADD CONSTRAINT round_play_format_check
CHECK (play_format IN ('stroke', 'match', 'skins', 'fourball', 'foursome', 'greensome', 'scramble_2', 'scramble_4', 'stableford', 'chapman', 'copenhagen', 'bbb', 'flag', 'shamble', 'money_ball', 'high_low_high'));
ALTER TABLE session DROP CONSTRAINT session_format_check;
ALTER TABLE session ADD CONSTRAINT session_format_check
CHECK (format IN ('singles', 'fourball', 'foursome', 'greensome', 'scramble_2', 'scramble_4', 'chapman', 'shamble', 'money_ball', 'high_low_high'));