astro_avtourist/backend/pb_migrations/1776352196_updated_post_votes.js

41 lines
958 B
JavaScript
Raw Normal View History

/// <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)
})