"""add ave and max power

Revision ID: 45fd75e5f16f
Revises: 98688d3d293b
Create Date: 2025-07-19 23:26:26.509887

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '45fd75e5f16f'
down_revision = '98688d3d293b'
branch_labels = None
depends_on = None


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

    with op.batch_alter_table('workouts', schema=None) as batch_op:
        batch_op.add_column(sa.Column('max_power', sa.Integer(), nullable=True))
        batch_op.add_column(sa.Column('ave_power', sa.Integer(), nullable=True))

    # ### end Alembic commands ###


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

    with op.batch_alter_table('workout_segments', schema=None) as batch_op:
        batch_op.drop_column('ave_power')
        batch_op.drop_column('max_power')

    # ### end Alembic commands ###
