"""empty message

Revision ID: c1be0bfabe2e
Revises: a286182fdf59
Create Date: 2023-03-06 11:16:22.434754

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "c1be0bfabe2e"
down_revision = "a286182fdf59"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("tmp_datafiles_cleanup")
    op.add_column("datafiles", sa.Column("custom_metadata", sa.JSON(), nullable=True))
    op.add_column(
        "upload_session_files", sa.Column("custom_metadata", sa.JSON(), nullable=True)
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("upload_session_files", "custom_metadata")
    op.drop_column("datafiles", "custom_metadata")
    op.create_table(
        "tmp_datafiles_cleanup",
        sa.Column("id", sa.VARCHAR(length=80), autoincrement=False, nullable=True),
        sa.Column(
            "orig_underlying_data_file_id",
            sa.VARCHAR(length=80),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "new_underlying_data_file_id",
            sa.VARCHAR(length=80),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column("update_count", sa.INTEGER(), autoincrement=False, nullable=True),
    )
    # ### end Alembic commands ###
