mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-08-03 15:11:44 +00:00
The sqlite triggers that keep libraryItems.title[IgnorePrefix] and authorNamesFirstLast/LastFirst fresh were skipped on postgres, so title edits, author renames, and bookAuthor changes left stale sort/search columns. Mirror them with native pg trigger functions (string_agg in place of GROUP_CONCAT) using folded lowercase identifiers, and keep the same trigger names and existence checks. Validated against PostgreSQL 14: title propagation, author insert/delete/rename, createdat ordering, and null-on-empty all match sqlite semantics. |
||
|---|---|---|
| .. | ||
| auth | ||
| controllers | ||
| finders | ||
| managers | ||
| migrations | ||
| models | ||
| objects | ||
| providers | ||
| scripts | ||
| utils | ||
| Database.test.js | ||
| Logger.test.js | ||