"""Add Dataset.history

Revision ID: 99ea79d9e5d2
Revises: 8f79bd162e35
Create Date: 2023-10-16 09:45:15.132185

"""
import sqlalchemy as sa
from alembic import op


# revision identifiers, used by Alembic.
revision = "99ea79d9e5d2"
down_revision = "8f79bd162e35"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("dataset", schema=None) as batch_op:
        batch_op.add_column(
            sa.Column(
                "history", sa.JSON(), server_default="[]", nullable=False
            )
        )

    # ### end Alembic commands ###


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

    # ### end Alembic commands ###
