"""Drop the stored setting for the removed http plugin The standalone `http` plugin was dissolved into the unified Monitor entity (0022_unify_monitors), but its `plugin.http` settings key outlived it: the key stayed in core DEFAULTS, so the operator saw a plugin that no longer exists reported as "enabled" with no way to clear it — deleting the row alone did nothing, because the default reasserted it on the next settings load. The DEFAULTS entry is removed in the same change; this migration clears any row an operator's database still carries so the two agree. Per family rule 22, the removed subsystem takes its setting row with it. Note: `http` remains a valid MONITOR TYPE (icmp/tcp/dns/http). This touches only the plugin-enablement key, never monitor data. Revision ID: 0025_drop_http_plugin_setting Revises: 0024_plugin_metrics_hourly Create Date: 2026-08-13 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = "0025_drop_http_plugin_setting" down_revision: Union[str, None] = "0024_plugin_metrics_hourly" branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: op.execute( sa.text("DELETE FROM app_settings WHERE key = 'plugin.http'") ) def downgrade() -> None: # Deliberately empty. Re-inserting `plugin.http` would recreate the exact # phantom this migration exists to remove, and the plugin it configured no # longer exists to read it. pass