- Added a new "status" field to the themes collection with options: draft, published, and rejected. - Updated the migration script to include the new field and its options. - Created a new ingestion migration script to ensure the "status" field includes "rejected" as an option if not already present. - Added multiple hot-update files for webpack to support the new changes in the frontend.
50 lines
1.0 KiB
JavaScript
50 lines
1.0 KiB
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("bm117d8jhn68xqr")
|
|
|
|
// update
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "mfk9eat0",
|
|
"name": "status",
|
|
"type": "select",
|
|
"required": true,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"maxSelect": 1,
|
|
"values": [
|
|
"draft",
|
|
"published",
|
|
"rejected"
|
|
]
|
|
}
|
|
}))
|
|
|
|
return dao.saveCollection(collection)
|
|
}, (db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("bm117d8jhn68xqr")
|
|
|
|
// update
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "mfk9eat0",
|
|
"name": "status",
|
|
"type": "select",
|
|
"required": true,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"maxSelect": 1,
|
|
"values": [
|
|
"draft",
|
|
"published"
|
|
]
|
|
}
|
|
}))
|
|
|
|
return dao.saveCollection(collection)
|
|
})
|