mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-04-26 15:01:20 +00:00
49 lines
1 KiB
JavaScript
49 lines
1 KiB
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("_pb_users_auth_")
|
|
|
|
// update
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "rncq13xn",
|
|
"name": "appearance_mode",
|
|
"type": "select",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"maxSelect": 1,
|
|
"values": [
|
|
"light",
|
|
"dark",
|
|
"system"
|
|
]
|
|
}
|
|
}))
|
|
|
|
return dao.saveCollection(collection)
|
|
}, (db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("_pb_users_auth_")
|
|
|
|
// update
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "rncq13xn",
|
|
"name": "appearance_mode",
|
|
"type": "select",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"maxSelect": 1,
|
|
"values": [
|
|
"light",
|
|
"dark"
|
|
]
|
|
}
|
|
}))
|
|
|
|
return dao.saveCollection(collection)
|
|
})
|