"""add engine_hardware_str to RecentRun model

Revision ID: 95bfa6af85ea
Revises: ec559277c8da
Create Date: 2024-02-02 12:56:53.377591

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '95bfa6af85ea'
down_revision: Union[str, None] = 'ec559277c8da'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('RecentRuns', schema=None) as batch_op:
        batch_op.add_column(sa.Column('engine_hardware_str', sa.String(), nullable=False, server_default='N/A'))
        batch_op.alter_column('engine_hardware_str', server_default=None)

    # ### end Alembic commands ###


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

    # ### end Alembic commands ###
