move pocketbase to dir

This commit is contained in:
tmshv committed 2026-04-12 19:13:24 +03:00
1 parent ed3f93de53
commit 5397615322
27 files changed
+55 -2

No files matched your search

+63
View File
@@ -0,0 +1,63 @@
/// <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"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2324736937",
"max": 0,
"min": 0,
"name": "key",
"pattern": "^[a-z0-9_]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "json2918445923",
"maxSize": 0,
"name": "data",
"presentable": false,
"required": true,
"system": false,
"type": "json"
}
],
"id": "pbc_1481978323",
"indexes": [
"CREATE UNIQUE INDEX `idx_UnQZ16xLVI` ON `kv` (`key`)"
],
"listRule": null,
"name": "kv",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1481978323");
return app.delete(collection);
})
@@ -0,0 +1,67 @@
/// <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"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2560465762",
"max": 10,
"min": 1,
"name": "slug",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text245846248",
"max": 0,
"min": 1,
"name": "label",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}
],
"id": "pbc_1219621782",
"indexes": [
"CREATE UNIQUE INDEX `idx_PxCK5CCdgj` ON `tags` (`slug`)"
],
"listRule": null,
"name": "tags",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1219621782");
return app.delete(collection);
})
@@ -0,0 +1,142 @@
/// <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": "file2359244304",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [],
"name": "file",
"presentable": false,
"protected": false,
"required": true,
"system": false,
"thumbs": [],
"type": "file"
},
{
"hidden": false,
"id": "file3112513328",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [
"image/jpeg",
"image/webp"
],
"name": "preview",
"presentable": false,
"protected": false,
"required": false,
"system": false,
"thumbs": [],
"type": "file"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1116045392",
"max": 0,
"min": 0,
"name": "mime",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text724990059",
"max": 0,
"min": 0,
"name": "title",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1007413605",
"max": 0,
"min": 0,
"name": "filename",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "number4156564586",
"max": null,
"min": null,
"name": "size",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"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_3446931122",
"indexes": [],
"listRule": null,
"name": "files",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3446931122");
return app.delete(collection);
})
@@ -0,0 +1,171 @@
/// <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": "file2359244304",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [
"image/jpeg",
"image/png",
"image/webp"
],
"name": "file",
"presentable": false,
"protected": false,
"required": true,
"system": false,
"thumbs": [
"100x100",
"600x0",
"1600x0"
],
"type": "file"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text678750603",
"max": 0,
"min": 0,
"name": "alt",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text4135340389",
"max": 0,
"min": 0,
"name": "caption",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1007413605",
"max": 0,
"min": 0,
"name": "filename",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "number4156564586",
"max": null,
"min": null,
"name": "size",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "number2350531887",
"max": null,
"min": null,
"name": "width",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "number4115522831",
"max": null,
"min": null,
"name": "height",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2482752583",
"max": 0,
"min": 0,
"name": "blurhash",
"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_3607937828",
"indexes": [],
"listRule": null,
"name": "images",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3607937828");
return app.delete(collection);
})
@@ -0,0 +1,148 @@
/// <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"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2560465762",
"max": 0,
"min": 1,
"name": "slug",
"pattern": "^[a-z0-9-]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text724990059",
"max": 0,
"min": 0,
"name": "title",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1591429585",
"max": 0,
"min": 0,
"name": "excerpt",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"cascadeDelete": false,
"collectionId": "pbc_3607937828",
"hidden": false,
"id": "relation2366146245",
"maxSelect": 1,
"minSelect": 0,
"name": "cover",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "date2862495610",
"max": "",
"min": "",
"name": "date",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"cascadeDelete": false,
"collectionId": "pbc_1219621782",
"hidden": false,
"id": "relation1874629670",
"maxSelect": 999,
"minSelect": 0,
"name": "tags",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "json4274335913",
"maxSize": 0,
"name": "content",
"presentable": false,
"required": true,
"system": false,
"type": "json"
},
{
"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_1125843985",
"indexes": [
"CREATE UNIQUE INDEX `idx_yj534DmAHs` ON `posts` (`slug`)"
],
"listRule": null,
"name": "posts",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985");
return app.delete(collection);
})
+22
View File
@@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1481978323")
// update collection data
unmarshal({
"listRule": "",
"viewRule": ""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1481978323")
// update collection data
unmarshal({
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})
@@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3446931122")
// update collection data
unmarshal({
"listRule": "",
"viewRule": ""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3446931122")
// update collection data
unmarshal({
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})
@@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3607937828")
// update collection data
unmarshal({
"listRule": "",
"viewRule": ""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3607937828")
// update collection data
unmarshal({
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})
@@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// update collection data
unmarshal({
"listRule": "",
"viewRule": ""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// update collection data
unmarshal({
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})
@@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1219621782")
// update collection data
unmarshal({
"listRule": "",
"viewRule": ""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1219621782")
// update collection data
unmarshal({
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})
@@ -0,0 +1,24 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// add field
collection.fields.addAt(8, new Field({
"hidden": false,
"id": "bool1182570132",
"name": "draft",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// remove field
collection.fields.removeById("bool1182570132")
return app.save(collection)
})
@@ -0,0 +1,42 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1219621782")
// update field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text2560465762",
"max": 15,
"min": 1,
"name": "slug",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1219621782")
// update field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text2560465762",
"max": 10,
"min": 1,
"name": "slug",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
return app.save(collection)
})
@@ -0,0 +1,42 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1219621782")
// update field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text2560465762",
"max": 15,
"min": 1,
"name": "slug",
"pattern": "^[a-z0-9-]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1219621782")
// update field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text2560465762",
"max": 15,
"min": 1,
"name": "slug",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
return app.save(collection)
})
@@ -0,0 +1,42 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1219621782")
// update field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text2560465762",
"max": 20,
"min": 1,
"name": "slug",
"pattern": "^[a-z0-9-]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1219621782")
// update field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text2560465762",
"max": 15,
"min": 1,
"name": "slug",
"pattern": "^[a-z0-9-]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
return app.save(collection)
})
@@ -0,0 +1,42 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3446931122")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "file2359244304",
"maxSelect": 1,
"maxSize": 104857600,
"mimeTypes": [],
"name": "file",
"presentable": false,
"protected": false,
"required": true,
"system": false,
"thumbs": [],
"type": "file"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3446931122")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "file2359244304",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [],
"name": "file",
"presentable": false,
"protected": false,
"required": true,
"system": false,
"thumbs": [],
"type": "file"
}))
return app.save(collection)
})
@@ -0,0 +1,27 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3607937828")
// remove field
collection.fields.removeById("number4156564586")
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3607937828")
// add field
collection.fields.addAt(5, new Field({
"hidden": false,
"id": "number4156564586",
"max": null,
"min": null,
"name": "size",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
})
@@ -0,0 +1,26 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// update collection data
unmarshal({
"indexes": [
"CREATE UNIQUE INDEX `idx_yj534DmAHs` ON `pages` (`slug`)"
],
"name": "pages"
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// update collection data
unmarshal({
"indexes": [
"CREATE UNIQUE INDEX `idx_yj534DmAHs` ON `posts` (`slug`)"
],
"name": "posts"
}, collection)
return app.save(collection)
})
@@ -0,0 +1,58 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3607937828")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "file2359244304",
"maxSelect": 1,
"maxSize": 10485760,
"mimeTypes": [
"image/jpeg",
"image/png",
"image/webp"
],
"name": "file",
"presentable": false,
"protected": false,
"required": true,
"system": false,
"thumbs": [
"100x100",
"600x0",
"1600x0"
],
"type": "file"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3607937828")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "file2359244304",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [
"image/jpeg",
"image/png",
"image/webp"
],
"name": "file",
"presentable": false,
"protected": false,
"required": true,
"system": false,
"thumbs": [
"100x100",
"600x0",
"1600x0"
],
"type": "file"
}))
return app.save(collection)
})
@@ -0,0 +1,41 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3607937828")
// update collection data
unmarshal({
"indexes": [
"CREATE UNIQUE INDEX `idx_i7TNFDMzt9` ON `images` (`sha256`)"
]
}, collection)
// add field
collection.fields.addAt(8, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1556616439",
"max": 0,
"min": 0,
"name": "sha256",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3607937828")
// update collection data
unmarshal({
"indexes": []
}, collection)
// remove field
collection.fields.removeById("text1556616439")
return app.save(collection)
})
@@ -0,0 +1,41 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3446931122")
// update collection data
unmarshal({
"indexes": [
"CREATE UNIQUE INDEX `idx_LXY1JfQhW9` ON `files` (`sha256`)"
]
}, collection)
// add field
collection.fields.addAt(7, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1556616439",
"max": 0,
"min": 0,
"name": "sha256",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3446931122")
// update collection data
unmarshal({
"indexes": []
}, collection)
// remove field
collection.fields.removeById("text1556616439")
return app.save(collection)
})
@@ -0,0 +1,42 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// update field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text2560465762",
"max": 0,
"min": 1,
"name": "slug",
"pattern": "^[a-z0-9-/]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// update field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text2560465762",
"max": 0,
"min": 1,
"name": "slug",
"pattern": "^[a-z0-9-]+$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
return app.save(collection)
})
@@ -0,0 +1,34 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// update field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "json4274335913",
"maxSize": 0,
"name": "doc",
"presentable": false,
"required": true,
"system": false,
"type": "json"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// update field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "json4274335913",
"maxSize": 0,
"name": "content",
"presentable": false,
"required": true,
"system": false,
"type": "json"
}))
return app.save(collection)
})
@@ -0,0 +1,47 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// add field
collection.fields.addAt(9, new Field({
"hidden": false,
"id": "json1182570132",
"maxSize": 0,
"name": "draft",
"presentable": false,
"required": false,
"system": false,
"type": "json"
}))
// update field
collection.fields.addAt(8, new Field({
"hidden": false,
"id": "bool1182570132",
"name": "published",
"presentable": false,
"required": true,
"system": false,
"type": "bool"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// remove field
collection.fields.removeById("json1182570132")
// update field
collection.fields.addAt(8, new Field({
"hidden": false,
"id": "bool1182570132",
"name": "draft",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
}))
return app.save(collection)
})