refactor(author): derive and store author sort name on save (#1897)

This commit is contained in:
Zach
2026-07-03 14:49:25 -04:00
committed by GitHub
parent 983804137f
commit 55b9d34c91
7 changed files with 424 additions and 0 deletions
@@ -0,0 +1,7 @@
ALTER TABLE author ADD COLUMN IF NOT EXISTS sort_name VARCHAR(255);
ALTER TABLE author ADD COLUMN IF NOT EXISTS sort_name_locked BOOLEAN NOT NULL DEFAULT FALSE;
UPDATE author SET sort_name = name
WHERE sort_name IS NULL;
CREATE INDEX IF NOT EXISTS idx_author_sort_name ON author (sort_name);