"""Drop teller_terakhir_manual and teller_terakhir_digital from master_spbu_nozzle.

These columns were a denormalized cache of the last teller reading, updated on every
laporan save. teller-init now queries directly from the previous shift's submitted
laporan, so these columns are no longer written or read.

Revision ID: h2k3l4m5n6o7
Revises: g1j2k3l4m5n6
Create Date: 2026-04-12
"""
from alembic import op
import sqlalchemy as sa

revision = "h2k3l4m5n6o7"
down_revision = "g1j2k3l4m5n6"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.drop_column("master_spbu_nozzle", "teller_terakhir_manual")
    op.drop_column("master_spbu_nozzle", "teller_terakhir_digital")


def downgrade() -> None:
    op.add_column(
        "master_spbu_nozzle",
        sa.Column("teller_terakhir_manual", sa.Numeric(precision=15, scale=3), nullable=True),
    )
    op.add_column(
        "master_spbu_nozzle",
        sa.Column("teller_terakhir_digital", sa.Numeric(precision=15, scale=3), nullable=True),
    )
