"""Drop workspace.planning_goal and leave_wish.goal_override. Product decision: there is only one sensible allocation objective — maximise the value extracted from parental-leave days plus vacation days. Exposing `max_time` / `max_money` / `balanced` as a user-facing setting made the planner's behaviour unpredictable without making it more useful. The engine now always applies what used to be the `max_money` policy; the `goal` concept (and the ability to override it per-wish) is removed entirely. Revision ID: 009 Revises: 008 Create Date: 2026-09-15 """ from __future__ import annotations from alembic import op revision: str = "009" down_revision: str | None = "008" branch_labels: str | None = None depends_on: str | None = None _UPGRADE_SQL = """ ALTER TABLE workspace DROP COLUMN planning_goal; ALTER TABLE leave_wish DROP COLUMN goal_override; """ _DOWNGRADE_SQL = """ ALTER TABLE workspace ADD COLUMN planning_goal TEXT NOT NULL DEFAULT 'balanced' CHECK (planning_goal IN ('max_time','max_money','balanced')); ALTER TABLE leave_wish ADD COLUMN goal_override TEXT CHECK (goal_override IS NULL OR goal_override IN ('max_time','max_money','balanced')); """ def upgrade() -> None: from sqlalchemy import text for stmt in [s.strip() for s in _UPGRADE_SQL.split(";") if s.strip()]: op.execute(text(stmt)) def downgrade() -> None: from sqlalchemy import text for stmt in [s.strip() for s in _DOWNGRADE_SQL.split(";") if s.strip()]: op.execute(text(stmt))