Add salary_cap column to Team model (v2.2.0)

- 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 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2025-12-10 07:28:16 -06:00
parent ef67b716e7
commit 254ce2ddc5
3 changed files with 11 additions and 1 deletions

View File

@ -1 +1 @@
2.1.3 2.2.0

View File

@ -286,6 +286,7 @@ class Team(BaseModel):
dice_color = CharField(null=True) dice_color = CharField(null=True)
season = IntegerField() season = IntegerField()
auto_draft = BooleanField(null=True) auto_draft = BooleanField(null=True)
salary_cap = FloatField(null=True)
@staticmethod @staticmethod
def select_season(num): def select_season(num):

View File

@ -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