"""Update sync_job entity counters

Revision ID: 1e286802b4d3
Revises: f40166b201f1
Create Date: 2025-04-28 11:02:10.451903

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '1e286802b4d3'
down_revision = 'f40166b201f1'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('sync_job', sa.Column('entities_updated', sa.Integer(), nullable=False, server_default="0"))
    op.add_column('sync_job', sa.Column('entities_kept', sa.Integer(), nullable=False, server_default="0"))
    op.drop_column('sync_job', 'entities_detected')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('sync_job', sa.Column('entities_detected', sa.INTEGER(), autoincrement=False, nullable=False, server_default="0"))
    op.drop_column('sync_job', 'entities_kept')
    op.drop_column('sync_job', 'entities_updated')
    # ### end Alembic commands ###
