Sort and look up text columns case-insensitively

Add COLLATE NOCASE on every text content column (names, owners, vendors,
device types, MAC addresses, notification titles/bodies/types, event
types) so DESC-by-name lists no longer order "iPad" before "Lutron".
Normalize MAC addresses to lowercase at the DB layer so the now
case-insensitive primary key cannot accept duplicate-looking rows.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-06-01 07:33:37 -04:00
co-authored by Claude Opus 4.7
parent 0304c50efb
commit 0beca44496
8 changed files with 225 additions and 15 deletions
@@ -1 +1 @@
ALTER TABLE devices ADD COLUMN name TEXT;
ALTER TABLE devices ADD COLUMN name TEXT COLLATE NOCASE;