Новы глобальные изменения компонентоы

This commit is contained in:
Web-serfer 2026-04-17 17:35:17 +05:00
parent 5d7bb04bf1
commit a269d3459e
43 changed files with 1667 additions and 517 deletions

View file

@ -0,0 +1,70 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"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"
},
{
"cascadeDelete": false,
"collectionId": "pbc_1125843985",
"hidden": false,
"id": "relation1267270444",
"maxSelect": 1,
"minSelect": 0,
"name": "post_id",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"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_941672112",
"indexes": [],
"listRule": null,
"name": "post_votes",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112");
return app.delete(collection);
})

View file

@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// add field
collection.fields.addAt(2, new Field({
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2809058197",
"maxSelect": 1,
"minSelect": 0,
"name": "user_id",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// remove field
collection.fields.removeById("relation2809058197")
return app.save(collection)
})

View file

@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// add field
collection.fields.addAt(3, new Field({
"hidden": false,
"id": "select1002219032",
"maxSelect": 1,
"name": "vote_type",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"like"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// remove field
collection.fields.removeById("select1002219032")
return app.save(collection)
})

View file

@ -0,0 +1,41 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update field
collection.fields.addAt(3, new Field({
"hidden": false,
"id": "select1002219032",
"maxSelect": 1,
"name": "vote_type",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"like",
"dislike"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update field
collection.fields.addAt(3, new Field({
"hidden": false,
"id": "select1002219032",
"maxSelect": 1,
"name": "vote_type",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"like"
]
}))
return app.save(collection)
})

View file

@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"listRule": "",
"viewRule": ""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})

View file

@ -0,0 +1,24 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"createRule": "@request.auth.id != \"\"",
"listRule": "@request.auth.id != \"\"",
"viewRule": "@request.auth.id != \"\""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"createRule": null,
"listRule": "",
"viewRule": ""
}, collection)
return app.save(collection)
})

View file

@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"deleteRule": "@request.auth.id != \"\"",
"updateRule": "@request.auth.id != \"\""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"deleteRule": null,
"updateRule": null
}, collection)
return app.save(collection)
})

View file

@ -0,0 +1,40 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update field
collection.fields.addAt(1, new Field({
"cascadeDelete": false,
"collectionId": "pbc_1125843985",
"hidden": false,
"id": "relation1267270444",
"maxSelect": 1,
"minSelect": 0,
"name": "post",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update field
collection.fields.addAt(1, new Field({
"cascadeDelete": false,
"collectionId": "pbc_1125843985",
"hidden": false,
"id": "relation1267270444",
"maxSelect": 1,
"minSelect": 0,
"name": "post_id",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
})

View file

@ -0,0 +1,40 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update field
collection.fields.addAt(2, new Field({
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2809058197",
"maxSelect": 1,
"minSelect": 0,
"name": "user",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update field
collection.fields.addAt(2, new Field({
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2809058197",
"maxSelect": 1,
"minSelect": 0,
"name": "user_id",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
})

View file

@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// remove field
collection.fields.removeById("relation2809058197")
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// add field
collection.fields.addAt(2, new Field({
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2809058197",
"maxSelect": 1,
"minSelect": 0,
"name": "user",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
})

View file

@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// add field
collection.fields.addAt(3, new Field({
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2375276105",
"maxSelect": 1,
"minSelect": 0,
"name": "user",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// remove field
collection.fields.removeById("relation2375276105")
return app.save(collection)
})

View file

@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"listRule": "@request.auth.id != \"\"",
"viewRule": "@request.auth.id != \"\""
}, collection)
return app.save(collection)
})

View file

@ -0,0 +1,20 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"createRule": null
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"createRule": "@request.auth.id != \"\""
}, collection)
return app.save(collection)
})

View file

@ -0,0 +1,24 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"createRule": "@request.auth.id != \"\"",
"listRule": "@request.auth.id != \"\"",
"viewRule": "@request.auth.id != \"\""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"createRule": null,
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})

View file

@ -0,0 +1,97 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112");
return app.delete(collection);
}, (app) => {
const collection = new Collection({
"createRule": "@request.auth.id != \"\"",
"deleteRule": "@request.auth.id != \"\"",
"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"
},
{
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2375276105",
"maxSelect": 1,
"minSelect": 0,
"name": "user",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"cascadeDelete": false,
"collectionId": "pbc_1125843985",
"hidden": false,
"id": "relation1267270444",
"maxSelect": 1,
"minSelect": 0,
"name": "post",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "select1002219032",
"maxSelect": 1,
"name": "vote_type",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"like",
"dislike"
]
},
{
"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_941672112",
"indexes": [],
"listRule": "@request.auth.id != \"\"",
"name": "post_votes",
"system": false,
"type": "base",
"updateRule": "@request.auth.id != \"\"",
"viewRule": "@request.auth.id != \"\""
});
return app.save(collection);
})

View file

@ -0,0 +1,57 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"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"
},
{
"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_941672112",
"indexes": [],
"listRule": null,
"name": "post_votes",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112");
return app.delete(collection);
})

View file

@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// add field
collection.fields.addAt(1, new Field({
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2375276105",
"maxSelect": 1,
"minSelect": 0,
"name": "user",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// remove field
collection.fields.removeById("relation2375276105")
return app.save(collection)
})

View file

@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// add field
collection.fields.addAt(2, new Field({
"cascadeDelete": false,
"collectionId": "pbc_1125843985",
"hidden": false,
"id": "relation1519021197",
"maxSelect": 1,
"minSelect": 0,
"name": "post",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// remove field
collection.fields.removeById("relation1519021197")
return app.save(collection)
})

View file

@ -0,0 +1,83 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112");
return app.delete(collection);
}, (app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"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"
},
{
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2375276105",
"maxSelect": 1,
"minSelect": 0,
"name": "user",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"cascadeDelete": false,
"collectionId": "pbc_1125843985",
"hidden": false,
"id": "relation1519021197",
"maxSelect": 1,
"minSelect": 0,
"name": "post",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"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_941672112",
"indexes": [],
"listRule": null,
"name": "post_votes",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
})

View file

@ -0,0 +1,83 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"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"
},
{
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2375276105",
"maxSelect": 1,
"minSelect": 0,
"name": "user",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"cascadeDelete": false,
"collectionId": "pbc_1125843985",
"hidden": false,
"id": "relation1519021197",
"maxSelect": 1,
"minSelect": 0,
"name": "post",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"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_941672112",
"indexes": [],
"listRule": null,
"name": "post_votes",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112");
return app.delete(collection);
})

View file

@ -0,0 +1,29 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// add field
collection.fields.addAt(3, new Field({
"hidden": false,
"id": "select1002219032",
"maxSelect": 1,
"name": "vote_type",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"like",
"dislike"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// remove field
collection.fields.removeById("select1002219032")
return app.save(collection)
})

View file

@ -0,0 +1,24 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"createRule": "",
"listRule": "",
"viewRule": ""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_941672112")
// update collection data
unmarshal({
"createRule": null,
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})