diff --git a/backend/pb_migrations/1736618000_update_time_entries_types.js b/backend/pb_migrations/1736618000_update_time_entries_types.js new file mode 100644 index 0000000..e05d0d8 --- /dev/null +++ b/backend/pb_migrations/1736618000_update_time_entries_types.js @@ -0,0 +1,17 @@ +migrate((db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("time_entries") + + const typeField = collection.schema.getFieldByName("type") + typeField.options.values = ["regular", "overtime", "standby", "callback", "non_contiguous"] + + return dao.saveCollection(collection) +}, (db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("time_entries") + + const typeField = collection.schema.getFieldByName("type") + typeField.options.values = ["regular", "overtime", "standby", "callback"] + + return dao.saveCollection(collection) +})