"""Add uod fields

Revision ID: 774e4df9ce40
Revises: 05c4bf88d0bb
Create Date: 2024-07-10 10:58:53.684832

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '774e4df9ce40'
down_revision: Union[str, None] = '05c4bf88d0bb'
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('uod_filename', sa.String(), nullable=False, server_default=''))
        batch_op.add_column(sa.Column('uod_author_name', sa.String(), nullable=False, server_default=''))
        batch_op.add_column(sa.Column('uod_author_email', sa.String(), nullable=False, server_default=''))

    # ### 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('uod_author_email')
        batch_op.drop_column('uod_author_name')
        batch_op.drop_column('uod_filename')

    # ### end Alembic commands ###
