mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2025-10-26 13:09:04 +08:00
chore(web): remove outdated migration files
This commit is contained in:
@@ -1,99 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"indexes": [
|
|
||||||
"CREATE UNIQUE INDEX `idx_tokenKey__pb_users_auth_` ON `users` (`tokenKey`)",
|
|
||||||
"CREATE UNIQUE INDEX `idx_email__pb_users_auth_` ON `users` (`username`) WHERE `email` != ''",
|
|
||||||
"CREATE UNIQUE INDEX `idx_xcjpYhojHH` ON `users` (`email`)"
|
|
||||||
],
|
|
||||||
"oauth2": {
|
|
||||||
"mappedFields": {
|
|
||||||
"name": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(1, new Field({
|
|
||||||
"cost": 0,
|
|
||||||
"hidden": true,
|
|
||||||
"id": "password901924565",
|
|
||||||
"max": 0,
|
|
||||||
"min": 5,
|
|
||||||
"name": "password",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": false,
|
|
||||||
"required": true,
|
|
||||||
"system": true,
|
|
||||||
"type": "password"
|
|
||||||
}))
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(3, new Field({
|
|
||||||
"autogeneratePattern": "",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text1579384326",
|
|
||||||
"max": 255,
|
|
||||||
"min": 5,
|
|
||||||
"name": "username",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": true,
|
|
||||||
"primaryKey": false,
|
|
||||||
"required": true,
|
|
||||||
"system": false,
|
|
||||||
"type": "text"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"indexes": [
|
|
||||||
"CREATE UNIQUE INDEX `idx_tokenKey__pb_users_auth_` ON `users` (`tokenKey`)",
|
|
||||||
"CREATE UNIQUE INDEX `idx_email__pb_users_auth_` ON `users` (`email`) WHERE `email` != ''"
|
|
||||||
],
|
|
||||||
"oauth2": {
|
|
||||||
"mappedFields": {
|
|
||||||
"name": "name"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(1, new Field({
|
|
||||||
"cost": 0,
|
|
||||||
"hidden": true,
|
|
||||||
"id": "password901924565",
|
|
||||||
"max": 0,
|
|
||||||
"min": 8,
|
|
||||||
"name": "password",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": false,
|
|
||||||
"required": true,
|
|
||||||
"system": true,
|
|
||||||
"type": "password"
|
|
||||||
}))
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(6, new Field({
|
|
||||||
"autogeneratePattern": "",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text1579384326",
|
|
||||||
"max": 255,
|
|
||||||
"min": 0,
|
|
||||||
"name": "name",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": false,
|
|
||||||
"primaryKey": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "text"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(4, new Field({
|
|
||||||
"exceptDomains": null,
|
|
||||||
"hidden": false,
|
|
||||||
"id": "email3885137012",
|
|
||||||
"name": "email",
|
|
||||||
"onlyDomains": null,
|
|
||||||
"presentable": false,
|
|
||||||
"required": false,
|
|
||||||
"system": true,
|
|
||||||
"type": "email"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(4, new Field({
|
|
||||||
"exceptDomains": null,
|
|
||||||
"hidden": false,
|
|
||||||
"id": "email3885137012",
|
|
||||||
"name": "email",
|
|
||||||
"onlyDomains": null,
|
|
||||||
"presentable": false,
|
|
||||||
"required": true,
|
|
||||||
"system": true,
|
|
||||||
"type": "email"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"authAlert": {
|
|
||||||
"enabled": false
|
|
||||||
},
|
|
||||||
"passwordAuth": {
|
|
||||||
"identityFields": [
|
|
||||||
"username"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"authAlert": {
|
|
||||||
"enabled": true
|
|
||||||
},
|
|
||||||
"passwordAuth": {
|
|
||||||
"identityFields": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,146 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = new Collection({
|
|
||||||
"createRule": "@request.auth.id = created_by.id || @request.auth.admin = true",
|
|
||||||
"deleteRule": "@request.auth.id = created_by.id || @request.auth.admin = true",
|
|
||||||
"fields": [
|
|
||||||
{
|
|
||||||
"autogeneratePattern": "[a-z0-9]{15}",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text3208210256",
|
|
||||||
"max": 15,
|
|
||||||
"min": 15,
|
|
||||||
"name": "id",
|
|
||||||
"pattern": "^[a-z0-9]+$",
|
|
||||||
"presentable": false,
|
|
||||||
"primaryKey": true,
|
|
||||||
"required": true,
|
|
||||||
"system": true,
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"autogeneratePattern": "",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text1579384326",
|
|
||||||
"max": 128,
|
|
||||||
"min": 0,
|
|
||||||
"name": "name",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": true,
|
|
||||||
"primaryKey": false,
|
|
||||||
"required": true,
|
|
||||||
"system": false,
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hidden": false,
|
|
||||||
"id": "file2043772302",
|
|
||||||
"maxSelect": 99,
|
|
||||||
"maxSize": 0,
|
|
||||||
"mimeTypes": [
|
|
||||||
"image/png",
|
|
||||||
"image/svg+xml"
|
|
||||||
],
|
|
||||||
"name": "assets",
|
|
||||||
"presentable": false,
|
|
||||||
"protected": false,
|
|
||||||
"required": true,
|
|
||||||
"system": false,
|
|
||||||
"thumbs": [],
|
|
||||||
"type": "file"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cascadeDelete": false,
|
|
||||||
"collectionId": "_pb_users_auth_",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "relation3725765462",
|
|
||||||
"maxSelect": 1,
|
|
||||||
"minSelect": 0,
|
|
||||||
"name": "created_by",
|
|
||||||
"presentable": true,
|
|
||||||
"required": true,
|
|
||||||
"system": false,
|
|
||||||
"type": "relation"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hidden": false,
|
|
||||||
"id": "select2063623452",
|
|
||||||
"maxSelect": 1,
|
|
||||||
"name": "status",
|
|
||||||
"presentable": true,
|
|
||||||
"required": true,
|
|
||||||
"system": false,
|
|
||||||
"type": "select",
|
|
||||||
"values": [
|
|
||||||
"waiting_approval",
|
|
||||||
"approved",
|
|
||||||
"refused"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"autogeneratePattern": "",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text1595063097",
|
|
||||||
"max": 0,
|
|
||||||
"min": 0,
|
|
||||||
"name": "aliases",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": false,
|
|
||||||
"primaryKey": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"autogeneratePattern": "",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text989021800",
|
|
||||||
"max": 0,
|
|
||||||
"min": 0,
|
|
||||||
"name": "categories",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": false,
|
|
||||||
"primaryKey": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hidden": false,
|
|
||||||
"id": "autodate2990389176",
|
|
||||||
"name": "created",
|
|
||||||
"onCreate": true,
|
|
||||||
"onUpdate": false,
|
|
||||||
"presentable": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "autodate"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hidden": false,
|
|
||||||
"id": "autodate3332085495",
|
|
||||||
"name": "updated",
|
|
||||||
"onCreate": true,
|
|
||||||
"onUpdate": true,
|
|
||||||
"presentable": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "autodate"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"id": "pbc_632646243",
|
|
||||||
"indexes": [
|
|
||||||
"CREATE UNIQUE INDEX `idx_vB4iK1BfdV` ON `submission` (`name`)"
|
|
||||||
],
|
|
||||||
"listRule": "@request.auth.id = created_by.id || @request.auth.admin = true",
|
|
||||||
"name": "submission",
|
|
||||||
"system": false,
|
|
||||||
"type": "base",
|
|
||||||
"updateRule": "@request.auth.id = created_by.id || @request.auth.admin = true",
|
|
||||||
"viewRule": "@request.auth.id = created_by.id || @request.auth.admin = true"
|
|
||||||
});
|
|
||||||
|
|
||||||
return app.save(collection);
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243");
|
|
||||||
|
|
||||||
return app.delete(collection);
|
|
||||||
})
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"updateRule": "id = @request.auth.id && (@request.body.admin = null || @request.body.admin = admin)"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
// add field
|
|
||||||
collection.fields.addAt(8, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "bool2282622326",
|
|
||||||
"name": "admin",
|
|
||||||
"presentable": true,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "bool"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"updateRule": "id = @request.auth.id"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
// remove field
|
|
||||||
collection.fields.removeById("bool2282622326")
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(8, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "bool2282622326",
|
|
||||||
"name": "admin",
|
|
||||||
"presentable": true,
|
|
||||||
"required": true,
|
|
||||||
"system": false,
|
|
||||||
"type": "bool"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(8, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "bool2282622326",
|
|
||||||
"name": "admin",
|
|
||||||
"presentable": true,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "bool"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(8, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "bool2282622326",
|
|
||||||
"name": "admin",
|
|
||||||
"presentable": true,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "bool"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(8, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "bool2282622326",
|
|
||||||
"name": "admin",
|
|
||||||
"presentable": true,
|
|
||||||
"required": true,
|
|
||||||
"system": false,
|
|
||||||
"type": "bool"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
|
||||||
|
|
||||||
// add field
|
|
||||||
collection.fields.addAt(5, new Field({
|
|
||||||
"cascadeDelete": true,
|
|
||||||
"collectionId": "_pb_users_auth_",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "relation1319357245",
|
|
||||||
"maxSelect": 1,
|
|
||||||
"minSelect": 0,
|
|
||||||
"name": "approved_by",
|
|
||||||
"presentable": true,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "relation"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
|
||||||
|
|
||||||
// remove field
|
|
||||||
collection.fields.removeById("relation1319357245")
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(4, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "bool2282622326",
|
|
||||||
"name": "admin",
|
|
||||||
"presentable": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "bool"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(4, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "bool2282622326",
|
|
||||||
"name": "admin",
|
|
||||||
"presentable": true,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "bool"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"indexes": [
|
|
||||||
"CREATE UNIQUE INDEX `idx_tokenKey__pb_users_auth_` ON `users` (`tokenKey`)",
|
|
||||||
"CREATE UNIQUE INDEX `idx_email__pb_users_auth_` ON `users` (`username`) WHERE `email` != ''",
|
|
||||||
"CREATE UNIQUE INDEX `idx_email_3ug5rzmspg` ON `test` (`email`) WHERE `email` != ''"
|
|
||||||
]
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"indexes": [
|
|
||||||
"CREATE UNIQUE INDEX `idx_tokenKey__pb_users_auth_` ON `users` (`tokenKey`)",
|
|
||||||
"CREATE UNIQUE INDEX `idx_email__pb_users_auth_` ON `users` (`username`) WHERE `email` != ''",
|
|
||||||
"CREATE UNIQUE INDEX `idx_xcjpYhojHH` ON `users` (`email`)"
|
|
||||||
]
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"indexes": [
|
|
||||||
"CREATE UNIQUE INDEX `idx_vB4iK1BfdV` ON `submissions` (`name`)"
|
|
||||||
],
|
|
||||||
"name": "submissions"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"indexes": [
|
|
||||||
"CREATE UNIQUE INDEX `idx_vB4iK1BfdV` ON `submission` (`name`)"
|
|
||||||
],
|
|
||||||
"name": "submission"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
|
||||||
|
|
||||||
// remove field
|
|
||||||
collection.fields.removeById("text1595063097")
|
|
||||||
|
|
||||||
// remove field
|
|
||||||
collection.fields.removeById("text989021800")
|
|
||||||
|
|
||||||
// add field
|
|
||||||
collection.fields.addAt(6, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "json1595063097",
|
|
||||||
"maxSize": 0,
|
|
||||||
"name": "aliases",
|
|
||||||
"presentable": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "json"
|
|
||||||
}))
|
|
||||||
|
|
||||||
// add field
|
|
||||||
collection.fields.addAt(7, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "json989021800",
|
|
||||||
"maxSize": 0,
|
|
||||||
"name": "categories",
|
|
||||||
"presentable": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "json"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
|
||||||
|
|
||||||
// add field
|
|
||||||
collection.fields.addAt(6, new Field({
|
|
||||||
"autogeneratePattern": "",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text1595063097",
|
|
||||||
"max": 0,
|
|
||||||
"min": 0,
|
|
||||||
"name": "aliases",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": false,
|
|
||||||
"primaryKey": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "text"
|
|
||||||
}))
|
|
||||||
|
|
||||||
// add field
|
|
||||||
collection.fields.addAt(7, new Field({
|
|
||||||
"autogeneratePattern": "",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text989021800",
|
|
||||||
"max": 0,
|
|
||||||
"min": 0,
|
|
||||||
"name": "categories",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": false,
|
|
||||||
"primaryKey": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "text"
|
|
||||||
}))
|
|
||||||
|
|
||||||
// remove field
|
|
||||||
collection.fields.removeById("json1595063097")
|
|
||||||
|
|
||||||
// remove field
|
|
||||||
collection.fields.removeById("json989021800")
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
|
||||||
|
|
||||||
// remove field
|
|
||||||
collection.fields.removeById("json989021800")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(6, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "json1595063097",
|
|
||||||
"maxSize": 0,
|
|
||||||
"name": "extras",
|
|
||||||
"presentable": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "json"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
|
||||||
|
|
||||||
// add field
|
|
||||||
collection.fields.addAt(7, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "json989021800",
|
|
||||||
"maxSize": 0,
|
|
||||||
"name": "categories",
|
|
||||||
"presentable": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "json"
|
|
||||||
}))
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(6, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "json1595063097",
|
|
||||||
"maxSize": 0,
|
|
||||||
"name": "aliases",
|
|
||||||
"presentable": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "json"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"createRule": "@request.body.admin = false || @request.body.admin = null",
|
|
||||||
"updateRule": "id = @request.auth.id && (@request.body.admin = false || @request.body.admin = admin)"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"createRule": "",
|
|
||||||
"updateRule": "id = @request.auth.id && (@request.body.admin = null || @request.body.admin = admin)"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(4, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "select2063623452",
|
|
||||||
"maxSelect": 1,
|
|
||||||
"name": "status",
|
|
||||||
"presentable": true,
|
|
||||||
"required": true,
|
|
||||||
"system": false,
|
|
||||||
"type": "select",
|
|
||||||
"values": [
|
|
||||||
"approved",
|
|
||||||
"refused",
|
|
||||||
"pending"
|
|
||||||
]
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
|
||||||
|
|
||||||
// update field
|
|
||||||
collection.fields.addAt(4, new Field({
|
|
||||||
"hidden": false,
|
|
||||||
"id": "select2063623452",
|
|
||||||
"maxSelect": 1,
|
|
||||||
"name": "status",
|
|
||||||
"presentable": true,
|
|
||||||
"required": true,
|
|
||||||
"system": false,
|
|
||||||
"type": "select",
|
|
||||||
"values": [
|
|
||||||
"waiting_approval",
|
|
||||||
"approved",
|
|
||||||
"refused"
|
|
||||||
]
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"passwordAuth": {
|
|
||||||
"identityFields": [
|
|
||||||
"username",
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"passwordAuth": {
|
|
||||||
"identityFields": [
|
|
||||||
"username"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"viewRule": "id = @request.auth.id || @request.body.admin = true"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"viewRule": "id = @request.auth.id"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"listRule": "id = @request.auth.id || @request.body.admin = true"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"listRule": "id = @request.auth.id"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"listRule": "id = @request.auth.id || @request.auth.admin = true",
|
|
||||||
"manageRule": "@request.auth.admin = true"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"listRule": "id = @request.auth.id || @request.body.admin = true",
|
|
||||||
"manageRule": null
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"viewRule": "id = @request.auth.id || @request.auth.admin = true"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"viewRule": "id = @request.auth.id || @request.body.admin = true"
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user