diff --git a/backend/pb_migrations/1778153189_created_site_stats.js b/backend/pb_migrations/1778153189_created_site_stats.js
new file mode 100644
index 0000000..8ed181b
--- /dev/null
+++ b/backend/pb_migrations/1778153189_created_site_stats.js
@@ -0,0 +1,96 @@
+///
+migrate((app) => {
+ const collection = new Collection({
+ "createRule": null,
+ "deleteRule": null,
+ "fields": [
+ {
+ "autogeneratePattern": "[a-z0-9]{15}",
+ "help": "",
+ "hidden": false,
+ "id": "text3208210256",
+ "max": 15,
+ "min": 15,
+ "name": "id",
+ "pattern": "^[a-z0-9]+$",
+ "presentable": false,
+ "primaryKey": true,
+ "required": true,
+ "system": true,
+ "type": "text"
+ },
+ {
+ "help": "",
+ "hidden": false,
+ "id": "number3017057989",
+ "max": null,
+ "min": null,
+ "name": "today",
+ "onlyInt": false,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "number"
+ },
+ {
+ "help": "",
+ "hidden": false,
+ "id": "number3257917790",
+ "max": null,
+ "min": null,
+ "name": "total",
+ "onlyInt": false,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "number"
+ },
+ {
+ "help": "",
+ "hidden": false,
+ "id": "date852920662",
+ "max": "",
+ "min": "",
+ "name": "last_reset",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "date"
+ },
+ {
+ "hidden": false,
+ "id": "autodate2990389176",
+ "name": "created",
+ "onCreate": true,
+ "onUpdate": false,
+ "presentable": false,
+ "system": false,
+ "type": "autodate"
+ },
+ {
+ "hidden": false,
+ "id": "autodate3332085495",
+ "name": "updated",
+ "onCreate": true,
+ "onUpdate": true,
+ "presentable": false,
+ "system": false,
+ "type": "autodate"
+ }
+ ],
+ "id": "pbc_1840088895",
+ "indexes": [],
+ "listRule": null,
+ "name": "site_stats",
+ "system": false,
+ "type": "base",
+ "updateRule": null,
+ "viewRule": null
+ });
+
+ return app.save(collection);
+}, (app) => {
+ const collection = app.findCollectionByNameOrId("pbc_1840088895");
+
+ return app.delete(collection);
+})
diff --git a/backend/pb_migrations/1778153252_updated_site_stats.js b/backend/pb_migrations/1778153252_updated_site_stats.js
new file mode 100644
index 0000000..22be94e
--- /dev/null
+++ b/backend/pb_migrations/1778153252_updated_site_stats.js
@@ -0,0 +1,20 @@
+///
+migrate((app) => {
+ const collection = app.findCollectionByNameOrId("pbc_1840088895")
+
+ // update collection data
+ unmarshal({
+ "updateRule": ""
+ }, collection)
+
+ return app.save(collection)
+}, (app) => {
+ const collection = app.findCollectionByNameOrId("pbc_1840088895")
+
+ // update collection data
+ unmarshal({
+ "updateRule": null
+ }, collection)
+
+ return app.save(collection)
+})
diff --git a/backend/pb_migrations/1778153329_deleted_site_visitors.js b/backend/pb_migrations/1778153329_deleted_site_visitors.js
new file mode 100644
index 0000000..9873c22
--- /dev/null
+++ b/backend/pb_migrations/1778153329_deleted_site_visitors.js
@@ -0,0 +1,103 @@
+///
+migrate((app) => {
+ const collection = app.findCollectionByNameOrId("pbc_2651661972");
+
+ return app.delete(collection);
+}, (app) => {
+ const collection = new Collection({
+ "createRule": "",
+ "deleteRule": "@request.auth.id != \"\"",
+ "fields": [
+ {
+ "autogeneratePattern": "[a-z0-9]{15}",
+ "help": "",
+ "hidden": false,
+ "id": "text3208210256",
+ "max": 15,
+ "min": 15,
+ "name": "id",
+ "pattern": "^[a-z0-9]+$",
+ "presentable": false,
+ "primaryKey": true,
+ "required": true,
+ "system": true,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "help": "",
+ "hidden": false,
+ "id": "text791980464",
+ "max": 0,
+ "min": 0,
+ "name": "visitor_hash",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "help": "",
+ "hidden": false,
+ "id": "text2783163181",
+ "max": 0,
+ "min": 0,
+ "name": "ip",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "help": "",
+ "hidden": false,
+ "id": "text3293145029",
+ "max": 0,
+ "min": 0,
+ "name": "user_agent",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "hidden": false,
+ "id": "autodate2990389176",
+ "name": "created",
+ "onCreate": true,
+ "onUpdate": false,
+ "presentable": false,
+ "system": false,
+ "type": "autodate"
+ },
+ {
+ "hidden": false,
+ "id": "autodate3332085495",
+ "name": "updated",
+ "onCreate": true,
+ "onUpdate": true,
+ "presentable": false,
+ "system": false,
+ "type": "autodate"
+ }
+ ],
+ "id": "pbc_2651661972",
+ "indexes": [],
+ "listRule": "",
+ "name": "site_visitors",
+ "system": false,
+ "type": "base",
+ "updateRule": "@request.auth.id != \"\"",
+ "viewRule": ""
+ });
+
+ return app.save(collection);
+})
diff --git a/backend/pb_migrations/1778154554_updated_posts.js b/backend/pb_migrations/1778154554_updated_posts.js
new file mode 100644
index 0000000..96c9854
--- /dev/null
+++ b/backend/pb_migrations/1778154554_updated_posts.js
@@ -0,0 +1,45 @@
+///
+migrate((app) => {
+ const collection = app.findCollectionByNameOrId("pbc_1125843985")
+
+ // add field
+ collection.fields.addAt(13, new Field({
+ "help": "",
+ "hidden": false,
+ "id": "number1269103533",
+ "max": null,
+ "min": null,
+ "name": "today_views",
+ "onlyInt": false,
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "number"
+ }))
+
+ // add field
+ collection.fields.addAt(14, new Field({
+ "help": "",
+ "hidden": false,
+ "id": "date852920662",
+ "max": "",
+ "min": "",
+ "name": "last_reset",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "date"
+ }))
+
+ return app.save(collection)
+}, (app) => {
+ const collection = app.findCollectionByNameOrId("pbc_1125843985")
+
+ // remove field
+ collection.fields.removeById("number1269103533")
+
+ // remove field
+ collection.fields.removeById("date852920662")
+
+ return app.save(collection)
+})
diff --git a/backend/pb_migrations/1778154579_deleted_post_views.js b/backend/pb_migrations/1778154579_deleted_post_views.js
new file mode 100644
index 0000000..fae39fc
--- /dev/null
+++ b/backend/pb_migrations/1778154579_deleted_post_views.js
@@ -0,0 +1,117 @@
+///
+migrate((app) => {
+ const collection = app.findCollectionByNameOrId("pbc_2019238136");
+
+ return app.delete(collection);
+}, (app) => {
+ const collection = new Collection({
+ "createRule": "@request.method = \"POST\"",
+ "deleteRule": "@request.auth.id != \"\"",
+ "fields": [
+ {
+ "autogeneratePattern": "[a-z0-9]{15}",
+ "help": "",
+ "hidden": false,
+ "id": "text3208210256",
+ "max": 15,
+ "min": 15,
+ "name": "id",
+ "pattern": "^[a-z0-9]+$",
+ "presentable": false,
+ "primaryKey": true,
+ "required": true,
+ "system": true,
+ "type": "text"
+ },
+ {
+ "cascadeDelete": false,
+ "collectionId": "pbc_1125843985",
+ "help": "",
+ "hidden": false,
+ "id": "relation1519021197",
+ "maxSelect": 0,
+ "minSelect": 0,
+ "name": "post",
+ "presentable": false,
+ "required": false,
+ "system": false,
+ "type": "relation"
+ },
+ {
+ "autogeneratePattern": "",
+ "help": "",
+ "hidden": false,
+ "id": "text791980464",
+ "max": 0,
+ "min": 0,
+ "name": "visitor_hash",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "help": "",
+ "hidden": false,
+ "id": "text2783163181",
+ "max": 0,
+ "min": 0,
+ "name": "ip",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "autogeneratePattern": "",
+ "help": "",
+ "hidden": false,
+ "id": "text3293145029",
+ "max": 0,
+ "min": 0,
+ "name": "user_agent",
+ "pattern": "",
+ "presentable": false,
+ "primaryKey": false,
+ "required": false,
+ "system": false,
+ "type": "text"
+ },
+ {
+ "hidden": false,
+ "id": "autodate2990389176",
+ "name": "created",
+ "onCreate": true,
+ "onUpdate": false,
+ "presentable": false,
+ "system": false,
+ "type": "autodate"
+ },
+ {
+ "hidden": false,
+ "id": "autodate3332085495",
+ "name": "updated",
+ "onCreate": true,
+ "onUpdate": true,
+ "presentable": false,
+ "system": false,
+ "type": "autodate"
+ }
+ ],
+ "id": "pbc_2019238136",
+ "indexes": [],
+ "listRule": "@request.method = \"GET\"",
+ "name": "post_views",
+ "system": false,
+ "type": "base",
+ "updateRule": "@request.auth.id != \"\"",
+ "viewRule": "@request.method = \"GET\""
+ });
+
+ return app.save(collection);
+})