"""add calories to workouts + add user preference for visibility

Revision ID: 267735b7574f
Revises: ef18bfbcc613
Create Date: 2025-12-25 17:31:16.887230

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '267735b7574f'
down_revision = 'ef18bfbcc613'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('workouts', schema=None) as batch_op:
        batch_op.add_column(sa.Column('calories', sa.Integer(), nullable=True))

    with op.batch_alter_table('users', schema=None) as batch_op:
        batch_op.add_column(sa.Column('calories_visibility', sa.Enum('PUBLIC', 'FOLLOWERS', 'PRIVATE', name='visibility_levels'), server_default='PRIVATE', nullable=False))

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('users', schema=None) as batch_op:
        batch_op.drop_column('calories_visibility')

    with op.batch_alter_table('workouts', schema=None) as batch_op:
        batch_op.drop_column('calories')

    # ### end Alembic commands ###
