"""Add calorie_target to family_profile

Revision ID: 0004
Revises: 0003
Create Date: 2026-05-04

The model has carried `calorie_target` on FamilyProfile since Phase 2,
but the initial migration omitted it. SELECT * from family_profile fails
without this column. Adversarial review §1.6 flagged the model/schema
drift.
"""
from alembic import op
import sqlalchemy as sa


revision = "0004"
down_revision = "0003"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        "family_profile",
        sa.Column("calorie_target", sa.Integer(), nullable=True),
    )


def downgrade() -> None:
    op.drop_column("family_profile", "calorie_target")
