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:
49
app/pb_migrations/1779612753_updated_themes.js
Normal file
49
app/pb_migrations/1779612753_updated_themes.js
Normal 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)
|
||||
})
|
||||
Reference in New Issue
Block a user