Add existing PB migrations
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -9,6 +9,7 @@ Icon
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
._*
|
||||
.env
|
||||
|
||||
|
||||
############################
|
||||
@@ -121,4 +122,4 @@ coverage
|
||||
# Pocketbase
|
||||
############################
|
||||
|
||||
pb
|
||||
pb/pb_data
|
||||
17
docker-compose.yml
Normal file
17
docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
web:
|
||||
build: web
|
||||
env_file: .env
|
||||
ports:
|
||||
- "4321:4321"
|
||||
|
||||
pb:
|
||||
build: pb
|
||||
env_file: .env
|
||||
volumes:
|
||||
- ./pb/pb_data:/pb/pb_data
|
||||
- ./pb/pb_migrations:/pb/pb_migrations
|
||||
- ./pb/pb_hooks:/pb/pb_hooks
|
||||
ports:
|
||||
- "8090:8090"
|
||||
|
||||
27
pb/Dockerfile
Normal file
27
pb/Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM alpine:latest
|
||||
|
||||
ARG PB_VERSION=0.29.2
|
||||
|
||||
WORKDIR /pb
|
||||
|
||||
RUN apk add --no-cache \
|
||||
unzip \
|
||||
curl \
|
||||
ca-certificates \
|
||||
bash \
|
||||
sqlite
|
||||
|
||||
# download and unzip PocketBase
|
||||
ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip
|
||||
RUN unzip /tmp/pb.zip -d /pb/
|
||||
|
||||
# copy entrypoint
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
VOLUME [ "/pb/pb_data", "/pb/pb_migrations", "/pb/pb_hooks" ]
|
||||
|
||||
EXPOSE 8090
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["serve", "--http=0.0.0.0:8090"]
|
||||
17
pb/docker-entrypoint.sh
Normal file
17
pb/docker-entrypoint.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# if there are no users yet, create the superuser
|
||||
# we check the sqlite file for any existing record in the users table
|
||||
# /pb/pocketbase superuser create "${PB_ADMIN_EMAIL}" "${PB_ADMIN_PASSWORD}"
|
||||
if [[ -f "${PB_DATA_DIR}/pb_data.db" ]]
|
||||
sqlite3 "${PB_DATA_DIR}/data.db" "SELECT id FROM _superusers WHERE email='${PB_ADMIN_EMAIL}' LIMIT 1;" | grep -q .; then
|
||||
|
||||
echo ">>> Creating PocketBase superuser: ${PB_ADMIN_EMAIL}"
|
||||
/pb/pocketbase superuser create "${PB_ADMIN_EMAIL}" "${PB_ADMIN_PASSWORD}"
|
||||
else
|
||||
echo ">>> Superuser ${PB_ADMIN_EMAIL} already exists, skipping creation."
|
||||
fi
|
||||
|
||||
# exec the real pocketbase binary with any passed arguments
|
||||
exec /pb/pocketbase "$@"
|
||||
88
pb/pb_migrations/1729829809_created_photos.js
Normal file
88
pb/pb_migrations/1729829809_created_photos.js
Normal file
@@ -0,0 +1,88 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const collection = new Collection({
|
||||
"id": "my9ej2vdwzwoqov",
|
||||
"created": "2024-10-25 04:16:49.283Z",
|
||||
"updated": "2024-10-25 04:16:49.283Z",
|
||||
"name": "photos",
|
||||
"type": "base",
|
||||
"system": false,
|
||||
"schema": [
|
||||
{
|
||||
"system": false,
|
||||
"id": "ryl3kxp1",
|
||||
"name": "title",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "qjf24kyo",
|
||||
"name": "location",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "0xsixg8e",
|
||||
"name": "camera",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "yi0qgiwo",
|
||||
"name": "image",
|
||||
"type": "file",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/vnd.mozilla.apng"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 10242880,
|
||||
"protected": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"indexes": [],
|
||||
"listRule": "",
|
||||
"viewRule": "",
|
||||
"createRule": null,
|
||||
"updateRule": null,
|
||||
"deleteRule": null,
|
||||
"options": {}
|
||||
});
|
||||
|
||||
return Dao(db).saveCollection(collection);
|
||||
}, (db) => {
|
||||
const dao = new Dao(db);
|
||||
const collection = dao.findCollectionByNameOrId("my9ej2vdwzwoqov");
|
||||
|
||||
return dao.deleteCollection(collection);
|
||||
})
|
||||
115
pb/pb_migrations/1729829809_created_posts.js
Normal file
115
pb/pb_migrations/1729829809_created_posts.js
Normal file
@@ -0,0 +1,115 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const collection = new Collection({
|
||||
"id": "jbzxvie5c27b6od",
|
||||
"created": "2024-10-25 04:16:49.284Z",
|
||||
"updated": "2024-10-25 04:16:49.284Z",
|
||||
"name": "posts",
|
||||
"type": "base",
|
||||
"system": false,
|
||||
"schema": [
|
||||
{
|
||||
"system": false,
|
||||
"id": "wczqiuyo",
|
||||
"name": "title",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "wtijeaol",
|
||||
"name": "description",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "p4fsu40d",
|
||||
"name": "content",
|
||||
"type": "editor",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"convertUrls": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "ecgjqmlq",
|
||||
"name": "tags",
|
||||
"type": "select",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"maxSelect": 2,
|
||||
"values": [
|
||||
"games",
|
||||
"stuff",
|
||||
"tv",
|
||||
"tech",
|
||||
"music"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "vbyoyeqa",
|
||||
"name": "slug",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "jvyrdwv7",
|
||||
"name": "publishDate",
|
||||
"type": "date",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": "",
|
||||
"max": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
"CREATE INDEX `idx_2HZXh7k` ON `posts` (\n `title`,\n `description`\n)"
|
||||
],
|
||||
"listRule": "",
|
||||
"viewRule": null,
|
||||
"createRule": null,
|
||||
"updateRule": null,
|
||||
"deleteRule": null,
|
||||
"options": {}
|
||||
});
|
||||
|
||||
return Dao(db).saveCollection(collection);
|
||||
}, (db) => {
|
||||
const dao = new Dao(db);
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od");
|
||||
|
||||
return dao.deleteCollection(collection);
|
||||
})
|
||||
55
pb/pb_migrations/1729834039_updated_photos.js
Normal file
55
pb/pb_migrations/1729834039_updated_photos.js
Normal file
@@ -0,0 +1,55 @@
|
||||
/// <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": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 10242880,
|
||||
"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"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 10242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
118
pb/pb_migrations/1729836765_created_software.js
Normal file
118
pb/pb_migrations/1729836765_created_software.js
Normal file
@@ -0,0 +1,118 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const collection = new Collection({
|
||||
"id": "z41ud3ifqqz6s5u",
|
||||
"created": "2024-10-25 06:12:45.045Z",
|
||||
"updated": "2024-10-25 06:12:45.045Z",
|
||||
"name": "software",
|
||||
"type": "base",
|
||||
"system": false,
|
||||
"schema": [
|
||||
{
|
||||
"system": false,
|
||||
"id": "wxujbfmv",
|
||||
"name": "name",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "wjbtsobd",
|
||||
"name": "description",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "if9876yi",
|
||||
"name": "icon",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "zxa3pr8b",
|
||||
"name": "getLink",
|
||||
"type": "url",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"exceptDomains": [],
|
||||
"onlyDomains": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "l7iy4crz",
|
||||
"name": "privacyPolicy",
|
||||
"type": "editor",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"convertUrls": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "cv8fgqw4",
|
||||
"name": "platforms",
|
||||
"type": "select",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"maxSelect": 6,
|
||||
"values": [
|
||||
"ios",
|
||||
"web",
|
||||
"lib",
|
||||
"macos",
|
||||
"linux",
|
||||
"windows"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
"CREATE INDEX `idx_HIfpJC7` ON `software` (\n `name`,\n `platforms`\n)"
|
||||
],
|
||||
"listRule": "",
|
||||
"viewRule": "",
|
||||
"createRule": null,
|
||||
"updateRule": null,
|
||||
"deleteRule": null,
|
||||
"options": {}
|
||||
});
|
||||
|
||||
return Dao(db).saveCollection(collection);
|
||||
}, (db) => {
|
||||
const dao = new Dao(db);
|
||||
const collection = dao.findCollectionByNameOrId("z41ud3ifqqz6s5u");
|
||||
|
||||
return dao.deleteCollection(collection);
|
||||
})
|
||||
40
pb/pb_migrations/1730856053_updated_posts.js
Normal file
40
pb/pb_migrations/1730856053_updated_posts.js
Normal file
@@ -0,0 +1,40 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "xdfhvrti",
|
||||
"name": "media",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/vnd.mozilla.apng",
|
||||
"image/jpeg",
|
||||
"image/jxl",
|
||||
"image/gif",
|
||||
"image/jxr"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 99,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("xdfhvrti")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
140
pb/pb_migrations/1730870006_updated_posts.js
Normal file
140
pb/pb_migrations/1730870006_updated_posts.js
Normal file
@@ -0,0 +1,140 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "ecgjqmlq",
|
||||
"name": "tags",
|
||||
"type": "select",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"maxSelect": 5,
|
||||
"values": [
|
||||
"games",
|
||||
"stuff",
|
||||
"tv",
|
||||
"tech",
|
||||
"music"
|
||||
]
|
||||
}
|
||||
}))
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "vbyoyeqa",
|
||||
"name": "slug",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
}))
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "xdfhvrti",
|
||||
"name": "media",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/vnd.mozilla.apng",
|
||||
"image/jpeg",
|
||||
"image/jxl",
|
||||
"image/gif",
|
||||
"image/jxr",
|
||||
"audio/mpeg",
|
||||
"video/mp4",
|
||||
"video/webm",
|
||||
"audio/mp4"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 99,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "ecgjqmlq",
|
||||
"name": "tags",
|
||||
"type": "select",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"maxSelect": 2,
|
||||
"values": [
|
||||
"games",
|
||||
"stuff",
|
||||
"tv",
|
||||
"tech",
|
||||
"music"
|
||||
]
|
||||
}
|
||||
}))
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "vbyoyeqa",
|
||||
"name": "slug",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
}))
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "xdfhvrti",
|
||||
"name": "media",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/vnd.mozilla.apng",
|
||||
"image/jpeg",
|
||||
"image/jxl",
|
||||
"image/gif",
|
||||
"image/jxr"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 99,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
36
pb/pb_migrations/1730928837_updated_posts.js
Normal file
36
pb/pb_migrations/1730928837_updated_posts.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "v7tapdp9",
|
||||
"name": "og_image",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("v7tapdp9")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
54
pb/pb_migrations/1730928924_updated_posts.js
Normal file
54
pb/pb_migrations/1730928924_updated_posts.js
Normal file
@@ -0,0 +1,54 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "v7tapdp9",
|
||||
"name": "header_image",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "v7tapdp9",
|
||||
"name": "og_image",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
54
pb/pb_migrations/1730929001_updated_posts.js
Normal file
54
pb/pb_migrations/1730929001_updated_posts.js
Normal file
@@ -0,0 +1,54 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "v7tapdp9",
|
||||
"name": "headerImage",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "v7tapdp9",
|
||||
"name": "header_image",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
54
pb/pb_migrations/1730929554_updated_posts.js
Normal file
54
pb/pb_migrations/1730929554_updated_posts.js
Normal file
@@ -0,0 +1,54 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "v7tapdp9",
|
||||
"name": "headerImage",
|
||||
"type": "file",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "v7tapdp9",
|
||||
"name": "headerImage",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
56
pb/pb_migrations/1730929652_updated_posts.js
Normal file
56
pb/pb_migrations/1730929652_updated_posts.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "v7tapdp9",
|
||||
"name": "headerImage",
|
||||
"type": "file",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [
|
||||
"1200x630"
|
||||
],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "v7tapdp9",
|
||||
"name": "headerImage",
|
||||
"type": "file",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/jpeg"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
44
pb/pb_migrations/1730971692_updated_posts.js
Normal file
44
pb/pb_migrations/1730971692_updated_posts.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("xdfhvrti")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "xdfhvrti",
|
||||
"name": "media",
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [
|
||||
"image/png",
|
||||
"image/vnd.mozilla.apng",
|
||||
"image/jpeg",
|
||||
"image/jxl",
|
||||
"image/gif",
|
||||
"image/jxr",
|
||||
"audio/mpeg",
|
||||
"video/mp4",
|
||||
"video/webm",
|
||||
"audio/mp4"
|
||||
],
|
||||
"thumbs": [],
|
||||
"maxSelect": 99,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
43
pb/pb_migrations/1730971817_created_posts_media.js
Normal file
43
pb/pb_migrations/1730971817_created_posts_media.js
Normal file
@@ -0,0 +1,43 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const collection = new Collection({
|
||||
"id": "eys4l76rqwkloyf",
|
||||
"created": "2024-11-07 09:30:17.186Z",
|
||||
"updated": "2024-11-07 09:30:17.186Z",
|
||||
"name": "posts_media",
|
||||
"type": "base",
|
||||
"system": false,
|
||||
"schema": [
|
||||
{
|
||||
"system": false,
|
||||
"id": "phojgvgc",
|
||||
"name": "field",
|
||||
"type": "file",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"indexes": [],
|
||||
"listRule": null,
|
||||
"viewRule": null,
|
||||
"createRule": null,
|
||||
"updateRule": null,
|
||||
"deleteRule": null,
|
||||
"options": {}
|
||||
});
|
||||
|
||||
return Dao(db).saveCollection(collection);
|
||||
}, (db) => {
|
||||
const dao = new Dao(db);
|
||||
const collection = dao.findCollectionByNameOrId("eys4l76rqwkloyf");
|
||||
|
||||
return dao.deleteCollection(collection);
|
||||
})
|
||||
29
pb/pb_migrations/1731115325_updated_software.js
Normal file
29
pb/pb_migrations/1731115325_updated_software.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("z41ud3ifqqz6s5u")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "rl3ddso9",
|
||||
"name": "privacy_policy",
|
||||
"type": "editor",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"convertUrls": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("z41ud3ifqqz6s5u")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("rl3ddso9")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
29
pb/pb_migrations/1731115342_updated_software.js
Normal file
29
pb/pb_migrations/1731115342_updated_software.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("z41ud3ifqqz6s5u")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("rl3ddso9")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("z41ud3ifqqz6s5u")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "rl3ddso9",
|
||||
"name": "privacy_policy",
|
||||
"type": "editor",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"convertUrls": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
56
pb/pb_migrations/1731149418_updated_software.js
Normal file
56
pb/pb_migrations/1731149418_updated_software.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("z41ud3ifqqz6s5u")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "cv8fgqw4",
|
||||
"name": "platforms",
|
||||
"type": "select",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"maxSelect": 6,
|
||||
"values": [
|
||||
"iOS",
|
||||
"web",
|
||||
"lib",
|
||||
"macos",
|
||||
"linux",
|
||||
"windows"
|
||||
]
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("z41ud3ifqqz6s5u")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "cv8fgqw4",
|
||||
"name": "platforms",
|
||||
"type": "select",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"maxSelect": 6,
|
||||
"values": [
|
||||
"ios",
|
||||
"web",
|
||||
"lib",
|
||||
"macos",
|
||||
"linux",
|
||||
"windows"
|
||||
]
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
31
pb/pb_migrations/1731214250_updated_photos.js
Normal file
31
pb/pb_migrations/1731214250_updated_photos.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("my9ej2vdwzwoqov")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "x9ytobkp",
|
||||
"name": "alt",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("my9ej2vdwzwoqov")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("x9ytobkp")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
44
pb/pb_migrations/1731214532_updated_photos.js
Normal file
44
pb/pb_migrations/1731214532_updated_photos.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/// <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": "x9ytobkp",
|
||||
"name": "alt",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("my9ej2vdwzwoqov")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "x9ytobkp",
|
||||
"name": "alt",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
27
pb/pb_migrations/1731543638_updated_posts.js
Normal file
27
pb/pb_migrations/1731543638_updated_posts.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "pyx8j5yb",
|
||||
"name": "published",
|
||||
"type": "bool",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("jbzxvie5c27b6od")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("pyx8j5yb")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
69
pb/pb_migrations/1731579848_updated_posts_media.js
Normal file
69
pb/pb_migrations/1731579848_updated_posts_media.js
Normal file
@@ -0,0 +1,69 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("eys4l76rqwkloyf")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "yfxer1xb",
|
||||
"name": "og_post",
|
||||
"type": "relation",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"collectionId": "jbzxvie5c27b6od",
|
||||
"cascadeDelete": false,
|
||||
"minSelect": null,
|
||||
"maxSelect": 1,
|
||||
"displayFields": null
|
||||
}
|
||||
}))
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "phojgvgc",
|
||||
"name": "field",
|
||||
"type": "file",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [],
|
||||
"thumbs": [],
|
||||
"maxSelect": 99,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("eys4l76rqwkloyf")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("yfxer1xb")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "phojgvgc",
|
||||
"name": "field",
|
||||
"type": "file",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"mimeTypes": [],
|
||||
"thumbs": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 5242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
33
pb/pb_migrations/1731579887_updated_posts_media.js
Normal file
33
pb/pb_migrations/1731579887_updated_posts_media.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("eys4l76rqwkloyf")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("yfxer1xb")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("eys4l76rqwkloyf")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "yfxer1xb",
|
||||
"name": "og_post",
|
||||
"type": "relation",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"collectionId": "jbzxvie5c27b6od",
|
||||
"cascadeDelete": false,
|
||||
"minSelect": null,
|
||||
"maxSelect": 1,
|
||||
"displayFields": null
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
56
pb/pb_migrations/1738657386_updated_photos.js
Normal file
56
pb/pb_migrations/1738657386_updated_photos.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/// <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": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 25242880,
|
||||
"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": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 10242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
56
pb/pb_migrations/1740093186_updated_photos.js
Normal file
56
pb/pb_migrations/1740093186_updated_photos.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/// <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": [],
|
||||
"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": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 25242880,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
58
pb/pb_migrations/1741669103_updated_photos.js
Normal file
58
pb/pb_migrations/1741669103_updated_photos.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/// <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": [
|
||||
"384x0"
|
||||
],
|
||||
"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": [],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 50000000,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
61
pb/pb_migrations/1741671794_updated_photos.js
Normal file
61
pb/pb_migrations/1741671794_updated_photos.js
Normal file
@@ -0,0 +1,61 @@
|
||||
/// <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"
|
||||
],
|
||||
"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": [
|
||||
"384x0"
|
||||
],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 50000000,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
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)
|
||||
})
|
||||
63
pb/pb_migrations/1741672501_updated_photos.js
Normal file
63
pb/pb_migrations/1741672501_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": [
|
||||
"800x0",
|
||||
"1400x0"
|
||||
],
|
||||
"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",
|
||||
"800x0"
|
||||
],
|
||||
"maxSelect": 1,
|
||||
"maxSize": 50000000,
|
||||
"protected": false
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
Reference in New Issue
Block a user