From 222339e6c559ff1788cbb5b5c6b1f888bcc45dec Mon Sep 17 00:00:00 2001 From: Kris Forbes Date: Mon, 12 Jan 2026 07:45:25 -0500 Subject: [PATCH] fix(backend): allow non_contiguous type in time_entries --- .../1736618000_update_time_entries_types.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 backend/pb_migrations/1736618000_update_time_entries_types.js 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) +})