From 6ea8444d049c359075838d676933dca480165f30 Mon Sep 17 00:00:00 2001 From: jedarden Date: Tue, 26 May 2026 13:32:29 -0400 Subject: [PATCH] feat(seasons): add seed migration for Season 1 Adds migration 0003_seed_seasons.sql that creates the initial season "Season 1: The Founding" with status=active. The index builder already has code to generate seasons/index.json from the database (generateSeasonsIndex in generator.go, fetchSeasons in db.go). The season starts 7 days ago and has no end date or champion yet, allowing it to serve as the active season for the platform. Closes: bf-4w0x --- migrations/0003_seed_seasons.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 migrations/0003_seed_seasons.sql diff --git a/migrations/0003_seed_seasons.sql b/migrations/0003_seed_seasons.sql new file mode 100644 index 0000000..325ddea --- /dev/null +++ b/migrations/0003_seed_seasons.sql @@ -0,0 +1,5 @@ +-- Seed the first season for AI Code Battle +-- This creates Season 1: The Founding, the initial competitive season + +INSERT INTO seasons (id, name, theme, rules_version, status, champion_id, starts_at, ends_at, created_at) VALUES +(1, 'Season 1: The Founding', 'The dawn of automated competition — bots clash for the first time on symmetrical battlefields.', '1.0', 'active', NULL, NOW() - INTERVAL '7 days', NULL, NOW() - INTERVAL '7 days');