diff --git a/.gitignore b/.gitignore
index 43255a8..24a6305 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ Icon
.Spotlight-V100
.Trashes
._*
+.env
############################
@@ -121,4 +122,4 @@ coverage
# Pocketbase
############################
-pb
\ No newline at end of file
+pb/pb_data
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..f3b509f
--- /dev/null
+++ b/docker-compose.yml
@@ -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"
+
diff --git a/pb/Dockerfile b/pb/Dockerfile
new file mode 100644
index 0000000..2cc5dd6
--- /dev/null
+++ b/pb/Dockerfile
@@ -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"]
diff --git a/pb/docker-entrypoint.sh b/pb/docker-entrypoint.sh
new file mode 100644
index 0000000..fd02ea1
--- /dev/null
+++ b/pb/docker-entrypoint.sh
@@ -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 "$@"
diff --git a/pb/pb_migrations/1729829809_created_photos.js b/pb/pb_migrations/1729829809_created_photos.js
new file mode 100644
index 0000000..2a6bcf9
--- /dev/null
+++ b/pb/pb_migrations/1729829809_created_photos.js
@@ -0,0 +1,88 @@
+///
+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);
+})
diff --git a/pb/pb_migrations/1729829809_created_posts.js b/pb/pb_migrations/1729829809_created_posts.js
new file mode 100644
index 0000000..c8f7d84
--- /dev/null
+++ b/pb/pb_migrations/1729829809_created_posts.js
@@ -0,0 +1,115 @@
+///
+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);
+})
diff --git a/pb/pb_migrations/1729834039_updated_photos.js b/pb/pb_migrations/1729834039_updated_photos.js
new file mode 100644
index 0000000..eda2baf
--- /dev/null
+++ b/pb/pb_migrations/1729834039_updated_photos.js
@@ -0,0 +1,55 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1729836765_created_software.js b/pb/pb_migrations/1729836765_created_software.js
new file mode 100644
index 0000000..9d66ec3
--- /dev/null
+++ b/pb/pb_migrations/1729836765_created_software.js
@@ -0,0 +1,118 @@
+///
+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);
+})
diff --git a/pb/pb_migrations/1730856053_updated_posts.js b/pb/pb_migrations/1730856053_updated_posts.js
new file mode 100644
index 0000000..85553c2
--- /dev/null
+++ b/pb/pb_migrations/1730856053_updated_posts.js
@@ -0,0 +1,40 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1730870006_updated_posts.js b/pb/pb_migrations/1730870006_updated_posts.js
new file mode 100644
index 0000000..8b94ab8
--- /dev/null
+++ b/pb/pb_migrations/1730870006_updated_posts.js
@@ -0,0 +1,140 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1730928837_updated_posts.js b/pb/pb_migrations/1730928837_updated_posts.js
new file mode 100644
index 0000000..97432be
--- /dev/null
+++ b/pb/pb_migrations/1730928837_updated_posts.js
@@ -0,0 +1,36 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1730928924_updated_posts.js b/pb/pb_migrations/1730928924_updated_posts.js
new file mode 100644
index 0000000..8ceaf4f
--- /dev/null
+++ b/pb/pb_migrations/1730928924_updated_posts.js
@@ -0,0 +1,54 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1730929001_updated_posts.js b/pb/pb_migrations/1730929001_updated_posts.js
new file mode 100644
index 0000000..60073a3
--- /dev/null
+++ b/pb/pb_migrations/1730929001_updated_posts.js
@@ -0,0 +1,54 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1730929554_updated_posts.js b/pb/pb_migrations/1730929554_updated_posts.js
new file mode 100644
index 0000000..e1e0ddb
--- /dev/null
+++ b/pb/pb_migrations/1730929554_updated_posts.js
@@ -0,0 +1,54 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1730929652_updated_posts.js b/pb/pb_migrations/1730929652_updated_posts.js
new file mode 100644
index 0000000..893b21e
--- /dev/null
+++ b/pb/pb_migrations/1730929652_updated_posts.js
@@ -0,0 +1,56 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1730971692_updated_posts.js b/pb/pb_migrations/1730971692_updated_posts.js
new file mode 100644
index 0000000..24f59a4
--- /dev/null
+++ b/pb/pb_migrations/1730971692_updated_posts.js
@@ -0,0 +1,44 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1730971817_created_posts_media.js b/pb/pb_migrations/1730971817_created_posts_media.js
new file mode 100644
index 0000000..33db5fb
--- /dev/null
+++ b/pb/pb_migrations/1730971817_created_posts_media.js
@@ -0,0 +1,43 @@
+///
+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);
+})
diff --git a/pb/pb_migrations/1731115325_updated_software.js b/pb/pb_migrations/1731115325_updated_software.js
new file mode 100644
index 0000000..7a29b81
--- /dev/null
+++ b/pb/pb_migrations/1731115325_updated_software.js
@@ -0,0 +1,29 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1731115342_updated_software.js b/pb/pb_migrations/1731115342_updated_software.js
new file mode 100644
index 0000000..c95eae1
--- /dev/null
+++ b/pb/pb_migrations/1731115342_updated_software.js
@@ -0,0 +1,29 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1731149418_updated_software.js b/pb/pb_migrations/1731149418_updated_software.js
new file mode 100644
index 0000000..740e1eb
--- /dev/null
+++ b/pb/pb_migrations/1731149418_updated_software.js
@@ -0,0 +1,56 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1731214250_updated_photos.js b/pb/pb_migrations/1731214250_updated_photos.js
new file mode 100644
index 0000000..800a633
--- /dev/null
+++ b/pb/pb_migrations/1731214250_updated_photos.js
@@ -0,0 +1,31 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1731214532_updated_photos.js b/pb/pb_migrations/1731214532_updated_photos.js
new file mode 100644
index 0000000..2a3528a
--- /dev/null
+++ b/pb/pb_migrations/1731214532_updated_photos.js
@@ -0,0 +1,44 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1731543638_updated_posts.js b/pb/pb_migrations/1731543638_updated_posts.js
new file mode 100644
index 0000000..1697960
--- /dev/null
+++ b/pb/pb_migrations/1731543638_updated_posts.js
@@ -0,0 +1,27 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1731579848_updated_posts_media.js b/pb/pb_migrations/1731579848_updated_posts_media.js
new file mode 100644
index 0000000..9cd7d6a
--- /dev/null
+++ b/pb/pb_migrations/1731579848_updated_posts_media.js
@@ -0,0 +1,69 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1731579887_updated_posts_media.js b/pb/pb_migrations/1731579887_updated_posts_media.js
new file mode 100644
index 0000000..3e14273
--- /dev/null
+++ b/pb/pb_migrations/1731579887_updated_posts_media.js
@@ -0,0 +1,33 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1738657386_updated_photos.js b/pb/pb_migrations/1738657386_updated_photos.js
new file mode 100644
index 0000000..02c1ef9
--- /dev/null
+++ b/pb/pb_migrations/1738657386_updated_photos.js
@@ -0,0 +1,56 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1740093186_updated_photos.js b/pb/pb_migrations/1740093186_updated_photos.js
new file mode 100644
index 0000000..65e59ce
--- /dev/null
+++ b/pb/pb_migrations/1740093186_updated_photos.js
@@ -0,0 +1,56 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1741669103_updated_photos.js b/pb/pb_migrations/1741669103_updated_photos.js
new file mode 100644
index 0000000..b71f916
--- /dev/null
+++ b/pb/pb_migrations/1741669103_updated_photos.js
@@ -0,0 +1,58 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1741671794_updated_photos.js b/pb/pb_migrations/1741671794_updated_photos.js
new file mode 100644
index 0000000..99c50dc
--- /dev/null
+++ b/pb/pb_migrations/1741671794_updated_photos.js
@@ -0,0 +1,61 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1741672017_updated_photos.js b/pb/pb_migrations/1741672017_updated_photos.js
new file mode 100644
index 0000000..7fd2d0a
--- /dev/null
+++ b/pb/pb_migrations/1741672017_updated_photos.js
@@ -0,0 +1,63 @@
+///
+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)
+})
diff --git a/pb/pb_migrations/1741672501_updated_photos.js b/pb/pb_migrations/1741672501_updated_photos.js
new file mode 100644
index 0000000..481a447
--- /dev/null
+++ b/pb/pb_migrations/1741672501_updated_photos.js
@@ -0,0 +1,63 @@
+///
+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)
+})