"""Add WAZUH scan_type enum value

Revision ID: 019
Revises: 018
Create Date: 2026-05-19 17:00:00.000000

Step 1 of 2 — only adds the enum value. The UPDATE backfill of
existing FULL/SYSCOLLECTOR rows is in migration 020 because Postgres
requires the new enum value to be committed before it can be used in
a DML statement, and alembic wraps each migration in a single
transaction by default.

Idempotent ADD VALUE IF NOT EXISTS.
"""
from alembic import op


revision = '019'
down_revision = '018'
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.execute("ALTER TYPE scantype ADD VALUE IF NOT EXISTS 'WAZUH'")


def downgrade() -> None:
    # Cannot DROP enum value safely; leave 'WAZUH' in the enum.
    pass
