-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path1746103215_updated_blueprints.js
More file actions
65 lines (61 loc) · 1.33 KB
/
1746103215_updated_blueprints.js
File metadata and controls
65 lines (61 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("f96llnpqjo2l87m")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ixmnqrhd",
"name": "images",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/jpeg",
"image/png",
"image/gif",
"image/webp"
],
"thumbs": [
"300x200",
"600x400",
"1200x800"
],
"maxSelect": 4,
"maxSize": 1048576,
"protected": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("f96llnpqjo2l87m")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ixmnqrhd",
"name": "images",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/jpeg",
"image/png",
"image/gif"
],
"thumbs": [
"300x200",
"600x400",
"1200x800"
],
"maxSelect": 8,
"maxSize": 5242880,
"protected": false
}
}))
return dao.saveCollection(collection)
})