b6db5b43

By: Michael Lynch <git@mtlynch.io>

Normalize legacy autocomplete item names

Older databases can contain item_sections keys that differ only by leading or
trailing whitespace. SQLite treats those keys as separate rows, but the
application trims display names before returning them to the autocomplete
control, causing visually duplicate suggestions such as "Ice Cream".

Migration 008 rebuilds item_sections with lowercase, trimmed keys and trimmed
display names. Rebuilding is necessary because normalizing a key can collide
with an existing primary key. For conflicts, the migration processes malformed
keys first and canonical keys last, so the canonical row retains its current
section and display name. It drops rows whose normalized name is empty.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 2s 9s 9s 12s 2s
Eval 8s 29s 29s 38s 0s
Build 18s 7m45s 1m45s 2m04s 0s
Suite 2s 8m24s 2m01s 2m04s 2s

Timeline

0s10s20s30s40s50s1m1m10s1m20s1m30s1m40s1m50s2m