Add existing PB migrations
This commit is contained in:
63
pb/pb_migrations/1741672017_updated_photos.js
Normal file
63
pb/pb_migrations/1741672017_updated_photos.js
Normal file
@@ -0,0 +1,63 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("my9ej2vdwzwoqov")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "yi0qgiwo",
|
||||
"name": "image",
|
||||
"type": "file",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/vnd.mozilla.apng",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [
|
||||
"720x0",
|
||||
"1080x0",
|
||||
"800x0"
|
||||
],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 50000000,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("my9ej2vdwzwoqov")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "yi0qgiwo",
|
||||
"name": "image",
|
||||
"type": "file",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/vnd.mozilla.apng",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [
|
||||
"720x0",
|
||||
"1080x0"
|
||||
],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 50000000,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
Reference in New Issue
Block a user