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 {