mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-09-11 13:28:57 +00:00
Add 'implemented' status option to Ideas collection schema
Adds migration for existing workspaces and updates the default definition for new workspaces.
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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%';
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user