Commit Graph
3 Commits
Author SHA1 Message Date
thomas 9d7a1add12 archivist: fix setup.go to keep the original collection shape
The previous commit replaced setup.go with an incomplete rewrite. This
restores the original file (fixed columns with created/updated, pages,
sha256 unique index, config-removal cleanup, event relation,
superuser upsert, errAppendOnly) and keeps only the intended changes:
- enum fields become select fields created with the dummy placeholder
  (or the configured template names for the template field)
- the startup cleanup of the enum value lists runs at the end of Setup
- setup_test.go asserts the select columns and the cleanup
2026-11-12 09:43:52 +01:00
thomas 2c0fb89144 archivist: official enum select fields with application-managed value lists
- enum fields become PocketBase select columns created with a single
  '-----' placeholder; the special template field starts with the
  configured template names (US-03, US-37)
- new enums.go owns the value lists: EnsureEnumValues registers new
  values before a record save validates them, CleanupEnumValues runs at
  startup and keeps only the values a document uses (placeholder kept
  only while alone), template forced to the configuration
- setup_test.go now asserts the select columns and the cleanup
2026-11-12 09:39:20 +01:00
thomas 02f7fd99bb Corrections after first run 2026-11-03 22:36:27 +01:00