141 lines
2.7 KiB
JavaScript
141 lines
2.7 KiB
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
|
|
|
// update
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "ecgjqmlq",
|
|
"name": "tags",
|
|
"type": "select",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"maxSelect": 5,
|
|
"values": [
|
|
"games",
|
|
"stuff",
|
|
"tv",
|
|
"tech",
|
|
"music"
|
|
]
|
|
}
|
|
}))
|
|
|
|
// update
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "vbyoyeqa",
|
|
"name": "slug",
|
|
"type": "text",
|
|
"required": true,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"min": null,
|
|
"max": null,
|
|
"pattern": ""
|
|
}
|
|
}))
|
|
|
|
// update
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "xdfhvrti",
|
|
"name": "media",
|
|
"type": "file",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"mimeTypes": [
|
|
"image/png",
|
|
"image/vnd.mozilla.apng",
|
|
"image/jpeg",
|
|
"image/jxl",
|
|
"image/gif",
|
|
"image/jxr",
|
|
"audio/mpeg",
|
|
"video/mp4",
|
|
"video/webm",
|
|
"audio/mp4"
|
|
],
|
|
"thumbs": [],
|
|
"maxSelect": 99,
|
|
"maxSize": 5242880,
|
|
"protected": false
|
|
}
|
|
}))
|
|
|
|
return dao.saveCollection(collection)
|
|
}, (db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
|
|
|
// update
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "ecgjqmlq",
|
|
"name": "tags",
|
|
"type": "select",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"maxSelect": 2,
|
|
"values": [
|
|
"games",
|
|
"stuff",
|
|
"tv",
|
|
"tech",
|
|
"music"
|
|
]
|
|
}
|
|
}))
|
|
|
|
// update
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "vbyoyeqa",
|
|
"name": "slug",
|
|
"type": "text",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"min": null,
|
|
"max": null,
|
|
"pattern": ""
|
|
}
|
|
}))
|
|
|
|
// update
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "xdfhvrti",
|
|
"name": "media",
|
|
"type": "file",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"mimeTypes": [
|
|
"image/png",
|
|
"image/vnd.mozilla.apng",
|
|
"image/jpeg",
|
|
"image/jxl",
|
|
"image/gif",
|
|
"image/jxr"
|
|
],
|
|
"thumbs": [],
|
|
"maxSelect": 99,
|
|
"maxSize": 5242880,
|
|
"protected": false
|
|
}
|
|
}))
|
|
|
|
return dao.saveCollection(collection)
|
|
})
|