Recipie/api/pb_migrations/1755041886_updated_recipes.js
june b8de3e82e9 [PIE-8] Add recipe detail view And Other Major Changes (!6)
- Adds /recipe/:id page
- (Almost!) fully designed and functional recipe view
- Has steps, images, ingredients, peripheral info (work/wait time, rating, description, servings)
- New colour scheme! Much more monotone but in a nice way (imo)
- New font, not condensed
- Several more smaller design changes
Co-authored-by: june <self@breadone.net>
Co-committed-by: june <self@breadone.net>
2025-08-13 16:54:05 +12:00

29 lines
695 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_842702175")
// add field
collection.fields.addAt(8, new Field({
"cascadeDelete": false,
"collectionId": "pbc_3146854971",
"hidden": false,
"id": "relation1264587087",
"maxSelect": 999,
"minSelect": 0,
"name": "ingredients",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_842702175")
// remove field
collection.fields.removeById("relation1264587087")
return app.save(collection)
})