"""retire the two settings that designated a design source for the app itself

Revision ID: 0075
Revises: 0074
Create Date: 2026-08-03

Two keys, retired for the same reason a week apart, so they go in one change
rather than one migration each:

    design_rulebook_id    which rulebook described how this app should look
    ui_design_system_id   which design system this app's own UI was built from

Both named a design source for THE RUNNING INSTALL. The design surface is for
the projects an install tracks, and a project already carries its own pointer
(`projects.design_system_id`) — so an install-wide designation had nothing left
to mean. `ui_design_system_id` was introduced by this same migration's first
draft and never reached a deployed database; it is listed here rather than
undone by an 0076 that would reverse a change nobody ran.

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 pointer lives on the project now, and always did for anyone who set it
there.
"""
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 IN ('design_rulebook_id', 'ui_design_system_id')"
        )
    )


def downgrade() -> None:
    pass
