Recipie/api/pb_migrations/1754995770_created_images.js
june c1910a71c6 [PIE-6] Add first (non-final) (temporary-ish) stylings (#5)
this was a doozy.
Co-authored-by: june <self@breadone.net>
Co-committed-by: june <self@breadone.net>
2025-08-12 23:39:33 +12:00

72 lines
1.6 KiB
JavaScript

/// <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": "file3309110367",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [],
"name": "image",
"presentable": false,
"protected": false,
"required": false,
"system": false,
"thumbs": [],
"type": "file"
},
{
"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);
})