"""retire the design_rulebook_id setting Revision ID: 0075 Revises: 0074 Create Date: 2026-08-03 The /design panel used to compare a design RULEBOOK's prose claims against the live tokens. That rulebook was imported into the design system and retired, and the panel now compares the running app against the design system it was generated from (#2419). Its designation moved with it: design_rulebook_id -> ui_design_system_id Nothing reads the old key any more, so this deletes the row rather than leaving an inert one behind (rule #22 — remove the old path, including the setting it read from). The values are not translatable: a rulebook id and a design system id are ids in different tables, and guessing a mapping would silently point the new panel at the wrong system. Deleting settings rows by key is safe in a way dropping a column is not — the table is free-form key/value, so an install that never designated one simply has no row to delete. Downgrade cannot restore what it never recorded, so it is a no-op rather than a lie: the operator re-designates in Settings. """ from alembic import op import sqlalchemy as sa revision = "0075" down_revision = "0074" branch_labels = None depends_on = None def upgrade() -> None: op.execute( sa.text("DELETE FROM settings WHERE key = 'design_rulebook_id'") ) def downgrade() -> None: pass