"""Add content hash column [aae4eed923b5].

Revision ID: aae4eed923b5
Revises: 0.84.3
Create Date: 2025-08-22 16:32:12.494008

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "aae4eed923b5"
down_revision = "0.84.3"
branch_labels = None
depends_on = None


def upgrade() -> None:
    """Upgrade database schema and/or data, creating a new revision."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("artifact_version", schema=None) as batch_op:
        batch_op.add_column(
            sa.Column("content_hash", sa.TEXT(), nullable=True)
        )

    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade database schema and/or data back to the previous revision."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("artifact_version", schema=None) as batch_op:
        batch_op.drop_column("content_hash")

    # ### end Alembic commands ###
