-- Real ledger data, transcribed Aug 2026. Run AFTER schema.sql:
--   mysql -u root -p < server/seed.sql
-- Idempotent: explicit ids + INSERT IGNORE, safe to re-run on test and prod.
--
-- NOTE: played_at dates are placeholders in ledger order — the only known date
-- is the Greenville Five Crowns game (Aug 1). Fix any with:
--   UPDATE matches SET played_at = '2026-07-04 20:00:00' WHERE id = 1;
--
-- p1 = Rob, p2 = Lindsay. Five Crowns is lowWins.

USE scoreForCouples;

INSERT IGNORE INTO matches (id, game_id, p1_score, p2_score, winner_id, note, played_at) VALUES
  (1,  'five-crowns', 77,  46,  'p2', NULL, '2026-07-18 20:00:00'),
  (2,  'five-crowns', 77,  26,  'p2', 'CRUNCH', '2026-07-25 20:00:00'),
  (3,  'five-crowns', 87,  88,  'p1', 'Greenville — won by a single point', '2026-08-01 20:00:00'),
  (4,  'five-crowns', 116, 100, 'p2', NULL, '2026-08-02 20:00:00'),
  (5,  'cribbage',    90,  120, 'p2', 'Skunk 🦨 — ledger says "R - S"; exact score unrecorded, logged as 90', '2026-08-05 19:00:00'),
  (6,  'cribbage',    116, 120, 'p2', NULL, '2026-08-05 19:45:00'),
  (7,  'cribbage',    116, 120, 'p2', NULL, '2026-08-05 20:30:00'),
  (8,  'cribbage',    115, 120, 'p2', NULL, '2026-08-05 21:15:00'),
  (9,  'five-crowns', 82,  179, 'p1', NULL, '2026-08-07 20:00:00'),
  (10, 'cribbage',    120, 102, 'p1', NULL, '2026-08-07 21:30:00'),
  (11, 'jenga',       1,   0,   'p1', 'Win/loss game — logged as 1–0', '2026-08-08 20:00:00'),
  (12, 'bowling',     1,   0,   'p1', 'Ledger tracked wins only ("r2 l1")', '2026-08-08 18:00:00'),
  (13, 'bowling',     1,   0,   'p1', 'Ledger tracked wins only ("r2 l1")', '2026-08-08 18:40:00'),
  (14, 'bowling',     0,   1,   'p2', 'Ledger tracked wins only ("r2 l1")', '2026-08-08 19:20:00');
