Files
wanderer/db/pb_migrations/1706295171_updated_trails.js
Christian Beutel b302ccded0 initial commit
2024-01-27 20:39:12 +01:00

93 lines
1.9 KiB
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "jjiidvbm",
"name": "thumbnail",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/png",
"image/vnd.mozilla.apng",
"image/jpeg",
"image/webp",
"image/svg+xml"
],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "k8xdrsyv",
"name": "gpx",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"application/gpx+xml"
],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "jjiidvbm",
"name": "thumbnail",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "k8xdrsyv",
"name": "gpx",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
return dao.saveCollection(collection)
})