Initial commit
All checks were successful
Docker Build and Publish / build-and-push (push) Successful in 2m17s

This commit is contained in:
2026-01-11 18:55:03 -05:00
commit 493ea4688c
45 changed files with 7107 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
migrate((db) => {
const dao = new Dao(db);
const collection = dao.findCollectionByNameOrId("time_entries");
// Add is_banked field
collection.schema.addField(new SchemaField({
name: "is_banked",
type: "bool",
required: false, // Default true handled in app logic or ignored for now
options: {}
}));
// Add manual_override field
collection.schema.addField(new SchemaField({
name: "manual_override",
type: "bool",
required: false,
options: {}
}));
// Add calculated_hours field
collection.schema.addField(new SchemaField({
name: "calculated_hours",
type: "number",
required: false,
options: {
min: null,
max: null,
noDecimal: false
}
}));
return dao.saveCollection(collection);
}, (db) => {
const dao = new Dao(db);
const collection = dao.findCollectionByNameOrId("time_entries");
// logic to remove fields if needed, usually tricky in PB migrations securely without losing data
// For now we just return null or attempt simple removal
collection.schema.removeField("is_banked");
collection.schema.removeField("manual_override");
collection.schema.removeField("calculated_hours");
return dao.saveCollection(collection);
})