mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-04-26 15:01:20 +00:00
feat: change pb updates
This commit is contained in:
parent
b96e8293e3
commit
4187a94d56
5 changed files with 32 additions and 129 deletions
|
@ -11,4 +11,4 @@ node_modules
|
|||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
backend
|
||||
/backend
|
|
@ -2,4 +2,4 @@
|
|||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
backend
|
||||
/backend
|
|
@ -1,33 +0,0 @@
|
|||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("_pb_users_auth_")
|
||||
|
||||
// add
|
||||
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)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("_pb_users_auth_")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("rncq13xn")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
|
@ -1,49 +0,0 @@
|
|||
/// <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)
|
||||
})
|
|
@ -1,50 +1,35 @@
|
|||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("_pb_users_auth_")
|
||||
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": "appearanceMode",
|
||||
"type": "select",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"maxSelect": 1,
|
||||
"values": [
|
||||
"light",
|
||||
"dark",
|
||||
"system"
|
||||
]
|
||||
}
|
||||
}))
|
||||
// update
|
||||
collection.schema.addField(
|
||||
new SchemaField({
|
||||
system: false,
|
||||
id: 'rncq13xn',
|
||||
name: 'appearanceMode',
|
||||
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_")
|
||||
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",
|
||||
"system"
|
||||
]
|
||||
}
|
||||
}))
|
||||
// remove
|
||||
collection.schema.removeField('rncq13xn');
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
return dao.saveCollection(collection);
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue