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:
parent
ef67b716e7
commit
254ce2ddc5
@ -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):
|
||||||
|
|||||||
9
migrations/2025-12-09_add_team_salary_cap.sql
Normal file
9
migrations/2025-12-09_add_team_salary_cap.sql
Normal 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
|
||||||
Loading…
Reference in New Issue
Block a user