From b3909b13ee9ea96afe8087bf5cb9a8a536f1463c Mon Sep 17 00:00:00 2001 From: xarmian Date: Thu, 26 Mar 2026 22:30:19 +0000 Subject: [PATCH] Add 'implemented' status option to Ideas collection schema Adds migration for existing workspaces and updates the default definition for new workspaces. --- internal/collections/defaults.go | 2 +- .../store/migrations/009_ideas_implemented_status.sql | 9 +++++++++ internal/store/store.go | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 internal/store/migrations/009_ideas_implemented_status.sql diff --git a/internal/collections/defaults.go b/internal/collections/defaults.go index 8a6343d4..f926e110 100644 --- a/internal/collections/defaults.go +++ b/internal/collections/defaults.go @@ -83,7 +83,7 @@ func Defaults() []DefaultCollection { Key: "status", Label: "Status", Type: "select", - Options: []string{"new", "exploring", "planned", "rejected"}, + Options: []string{"new", "exploring", "planned", "implemented", "rejected"}, Default: "new", Required: true, }, diff --git a/internal/store/migrations/009_ideas_implemented_status.sql b/internal/store/migrations/009_ideas_implemented_status.sql new file mode 100644 index 00000000..a274e7e6 --- /dev/null +++ b/internal/store/migrations/009_ideas_implemented_status.sql @@ -0,0 +1,9 @@ +UPDATE collections +SET schema = json_replace( + schema, + '$.fields[0].options', + json('["new","exploring","planned","implemented","rejected"]') +) +WHERE slug = 'ideas' + AND json_extract(schema, '$.fields[0].key') = 'status' + AND json_extract(schema, '$.fields[0].options') NOT LIKE '%implemented%'; diff --git a/internal/store/store.go b/internal/store/store.go index 8638dd90..b43d3a5f 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -70,6 +70,7 @@ func (s *Store) migrate() error { "006_item_numbers.sql", "007_comments.sql", "008_tasks_phase_field.sql", + "009_ideas_implemented_status.sql", } for _, name := range migrations {