This repository has been archived on 2025-12-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BreadnetV3/pb/pb_migrations/1730929001_updated_posts.js
2025-11-13 23:45:26 +13:00

55 lines
1.2 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": "v7tapdp9",
"name": "headerImage",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/png",
"image/jpeg"
],
"thumbs": [],
"maxSelect": 1,
"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": "v7tapdp9",
"name": "header_image",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/png",
"image/jpeg"
],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
return dao.saveCollection(collection)
})