feat: add status field to themes collection and update migration scripts

- 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.
This commit is contained in:
RaymondVerhoef
2026-05-24 10:56:45 +02:00
parent 8684ffa35b
commit 815cf0f673
98 changed files with 866 additions and 94 deletions

View File

@@ -0,0 +1,49 @@
/// <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)
})