vereinshaus/pocketbase/pb_migrations/1779230700_termine_serie.js

25 lines
977 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const c = app.findCollectionByNameOrId("pbc_2279568741") // termine
// rrule RFC-5545-Wiederholungsregel (nur RRULE-Teil ohne DTSTART)
c.fields.addAt(99, new Field({
"type": "text", "id": "text2001000090", "name": "rrule",
"help": "", "hidden": false, "presentable": false, "required": false, "system": false,
"autogeneratePattern": "", "min": 0, "max": 0, "pattern": ""
}))
// serie_id gruppiert alle Termine einer Wiederholungsserie
c.fields.addAt(99, new Field({
"type": "text", "id": "text2001000091", "name": "serie_id",
"help": "", "hidden": false, "presentable": false, "required": false, "system": false,
"autogeneratePattern": "", "min": 0, "max": 0, "pattern": ""
}))
app.save(c)
}, (app) => {
const c = app.findCollectionByNameOrId("pbc_2279568741")
c.fields.removeById("text2001000090")
c.fields.removeById("text2001000091")
app.save(c)
})