From 254ce2ddc53a5c10abd526dcb30d8aed7076b155 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Wed, 10 Dec 2025 07:28:16 -0600 Subject: [PATCH] Add salary_cap column to Team model (v2.2.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add optional salary_cap (REAL/float) column to team table - Create migration file for PostgreSQL schema change - Update Peewee model with FloatField(null=True) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- VERSION | 2 +- app/db_engine.py | 1 + migrations/2025-12-09_add_team_salary_cap.sql | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 migrations/2025-12-09_add_team_salary_cap.sql diff --git a/VERSION b/VERSION index ac2cdeb..ccbccc3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.3 +2.2.0 diff --git a/app/db_engine.py b/app/db_engine.py index e7aac43..1ecb218 100644 --- a/app/db_engine.py +++ b/app/db_engine.py @@ -286,6 +286,7 @@ class Team(BaseModel): dice_color = CharField(null=True) season = IntegerField() auto_draft = BooleanField(null=True) + salary_cap = FloatField(null=True) @staticmethod def select_season(num): diff --git a/migrations/2025-12-09_add_team_salary_cap.sql b/migrations/2025-12-09_add_team_salary_cap.sql new file mode 100644 index 0000000..519ab08 --- /dev/null +++ b/migrations/2025-12-09_add_team_salary_cap.sql @@ -0,0 +1,9 @@ +-- Migration: Add salary_cap column to teams table +-- Date: 2025-12-09 +-- Description: Adds optional salary_cap column to track team salary cap values + +ALTER TABLE team +ADD COLUMN IF NOT EXISTS salary_cap REAL; + +-- Note: REAL is PostgreSQL's single-precision floating-point type +-- Column is nullable (no NOT NULL constraint) so existing rows get NULL