"""last_checksum_history

Revision ID: 10d2041b94d4
Revises: eb5f1ec65156
Create Date: 2026-01-11 16:56:50.108607

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
import sqlmodel
import sqlmodel.sql.sqltypes


# revision identifiers, used by Alembic.
revision: str = '10d2041b94d4'
down_revision: Union[str, None] = 'eb5f1ec65156'
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('users', schema=None) as batch_op:
        batch_op.add_column(sa.Column('last_checksum_history', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
    with op.batch_alter_table('permissions', schema=None) as batch_op:
        batch_op.add_column(sa.Column('last_checksum_history', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
    with op.batch_alter_table('roles', schema=None) as batch_op:
        batch_op.add_column(sa.Column('last_checksum_history', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
    with op.batch_alter_table('entries', schema=None) as batch_op:
        batch_op.add_column(sa.Column('last_checksum_history', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
    with op.batch_alter_table('spaces', schema=None) as batch_op:
        batch_op.add_column(sa.Column('last_checksum_history', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
    with op.batch_alter_table('histories', schema=None) as batch_op:
        batch_op.add_column(sa.Column('last_checksum_history', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
    with op.batch_alter_table('attachments', schema=None) as batch_op:
        batch_op.add_column(sa.Column('last_checksum_history', sqlmodel.sql.sqltypes.AutoString(), nullable=True))


# ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('users', schema=None) as batch_op:
        batch_op.drop_column('last_checksum_history')
    with op.batch_alter_table('permissions', schema=None) as batch_op:
        batch_op.drop_column('last_checksum_history')
    with op.batch_alter_table('roles', schema=None) as batch_op:
        batch_op.drop_column('last_checksum_history')
    with op.batch_alter_table('entries', schema=None) as batch_op:
        batch_op.drop_column('last_checksum_history')
    with op.batch_alter_table('spaces', schema=None) as batch_op:
        batch_op.drop_column('last_checksum_history')
    with op.batch_alter_table('histories', schema=None) as batch_op:
        batch_op.drop_column('last_checksum_history')
    with op.batch_alter_table('attachments', schema=None) as batch_op:
        batch_op.drop_column('last_checksum_history')


    # ### end Alembic commands ###
