adds svelte API

This commit is contained in:
Christian Beutel
2024-03-09 16:46:02 +01:00
parent 33c3b273ab
commit 1b493f576e
114 changed files with 1574 additions and 2528 deletions

View File

@@ -5,7 +5,7 @@ WORKDIR /
COPY go.mod ./
COPY go.sum ./
COPY pb_migrations ./pb_migrations
COPY migrations ./migrations
RUN go mod download
@@ -14,8 +14,8 @@ COPY *.go ./
RUN go build -o /pocketbase
RUN /pocketbase migrate
ENV PUBLIC_MEILISEARCH_URL=http://localhost:7700
ENV MEILISEARCH_MASTER_KEY=
ENV MEILI_URL=http://localhost:7700
ENV MEILI_MASTER_KEY=
EXPOSE 8090

View File

@@ -9,6 +9,9 @@ import (
"github.com/pocketbase/pocketbase"
"github.com/pocketbase/pocketbase/core"
"github.com/pocketbase/pocketbase/models"
"github.com/pocketbase/pocketbase/plugins/migratecmd"
_ "pocketbase/migrations"
)
func indexRecord(r *models.Record, client *meilisearch.Client) error {
@@ -43,9 +46,14 @@ func indexRecord(r *models.Record, client *meilisearch.Client) error {
func main() {
app := pocketbase.New()
migratecmd.MustRegister(app, app.RootCmd, migratecmd.Config{
Dir: "migrations",
Automigrate: true,
})
client := meilisearch.NewClient(meilisearch.ClientConfig{
Host: os.Getenv("PUBLIC_MEILISEARCH_URL"),
APIKey: os.Getenv("MEILISEARCH_MASTER_KEY"),
Host: os.Getenv("MEILI_URL"),
APIKey: os.Getenv("MEILI_MASTER_KEY"),
})
app.OnRecordAfterCreateRequest("users").Add(func(e *core.RecordCreateEvent) error {

View File

@@ -0,0 +1,665 @@
package migrations
import (
"encoding/json"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/daos"
m "github.com/pocketbase/pocketbase/migrations"
"github.com/pocketbase/pocketbase/models"
)
func init() {
m.Register(func(db dbx.Builder) error {
jsonData := `[
{
"id": "_pb_users_auth_",
"created": "2024-01-26 15:05:23.262Z",
"updated": "2024-02-29 16:52:40.743Z",
"name": "users",
"type": "auth",
"system": false,
"schema": [
{
"system": false,
"id": "dlzhxcn2",
"name": "token",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "users_avatar",
"name": "avatar",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/jpeg",
"image/png",
"image/svg+xml",
"image/gif",
"image/webp"
],
"thumbs": null,
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
},
{
"system": false,
"id": "wjofulpg",
"name": "unit",
"type": "select",
"required": false,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"metric",
"imperial"
]
}
},
{
"system": false,
"id": "t1wlsqyp",
"name": "language",
"type": "select",
"required": false,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"en",
"de"
]
}
},
{
"system": false,
"id": "wosrk4ue",
"name": "location",
"type": "json",
"required": false,
"presentable": false,
"unique": false,
"options": {
"maxSize": 2000000
}
}
],
"indexes": [],
"listRule": "id = @request.auth.id",
"viewRule": "id = @request.auth.id",
"createRule": "",
"updateRule": "id = @request.auth.id",
"deleteRule": "id = @request.auth.id",
"options": {
"allowEmailAuth": true,
"allowOAuth2Auth": true,
"allowUsernameAuth": true,
"exceptEmailDomains": null,
"manageRule": null,
"minPasswordLength": 8,
"onlyEmailDomains": null,
"onlyVerified": false,
"requireEmail": false
}
},
{
"id": "e864strfxo14pm4",
"created": "2024-01-26 18:46:35.843Z",
"updated": "2024-02-23 12:47:30.327Z",
"name": "trails",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "wquvuytd",
"name": "name",
"type": "text",
"required": true,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "6kkucam1",
"name": "description",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "8x74ba26",
"name": "location",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "ehrmydva",
"name": "public",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
},
{
"system": false,
"id": "epgmtyxy",
"name": "distance",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": 0,
"max": null,
"noDecimal": false
}
},
{
"system": false,
"id": "5wxdt3aj",
"name": "elevation_gain",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
},
{
"system": false,
"id": "ukr9rqz4",
"name": "duration",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": 0,
"max": null,
"noDecimal": false
}
},
{
"system": false,
"id": "eqeqja1s",
"name": "lat",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
},
{
"system": false,
"id": "y6dbfyw6",
"name": "lon",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
},
{
"system": false,
"id": "mcqce8l9",
"name": "thumbnail",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "aqbpyawe",
"name": "photos",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/jpeg",
"image/vnd.mozilla.apng",
"image/png",
"image/webp",
"image/svg+xml"
],
"thumbs": [],
"maxSelect": 99,
"maxSize": 5242880,
"protected": false
}
},
{
"system": false,
"id": "k8xdrsyv",
"name": "gpx",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
},
{
"system": false,
"id": "b49obm5u",
"name": "category",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "kjxvi8asj2igqwf",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
},
{
"system": false,
"id": "1utgul91",
"name": "author",
"type": "relation",
"required": true,
"presentable": false,
"unique": false,
"options": {
"collectionId": "_pb_users_auth_",
"cascadeDelete": true,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
},
{
"system": false,
"id": "e1lwowvd",
"name": "summit_logs",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "dd2l9a4vxpy2ni8",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
},
{
"system": false,
"id": "ppq2sist",
"name": "waypoints",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "goeo2ubp103rzp9",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}
],
"indexes": [],
"listRule": "author = @request.auth.id || public = true",
"viewRule": "author = @request.auth.id || public = true",
"createRule": "@request.auth.id != \"\" && (@request.data.author = @request.auth.id)",
"updateRule": "author = @request.auth.id ",
"deleteRule": "author = @request.auth.id ",
"options": {}
},
{
"id": "kjxvi8asj2igqwf",
"created": "2024-01-26 18:47:30.797Z",
"updated": "2024-01-27 09:38:36.240Z",
"name": "categories",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "38tbd8u4",
"name": "name",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "64dsnxtb",
"name": "img",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}
],
"indexes": [],
"listRule": "",
"viewRule": "",
"createRule": null,
"updateRule": null,
"deleteRule": null,
"options": {}
},
{
"id": "goeo2ubp103rzp9",
"created": "2024-01-26 18:50:13.695Z",
"updated": "2024-02-04 11:49:30.732Z",
"name": "waypoints",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "2yegzjtk",
"name": "name",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "3xtcjtxv",
"name": "description",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "ygotgxzy",
"name": "lat",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
},
{
"system": false,
"id": "q0ygnxd2",
"name": "lon",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
},
{
"system": false,
"id": "rnjgm2tk",
"name": "icon",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}
],
"indexes": [],
"listRule": "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)",
"viewRule": "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)",
"createRule": "@request.auth.id != \"\"",
"updateRule": "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id && (@collection.trails.author = @request.auth.id)",
"deleteRule": "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id && (@collection.trails.author = @request.auth.id)",
"options": {}
},
{
"id": "dd2l9a4vxpy2ni8",
"created": "2024-01-27 12:23:48.069Z",
"updated": "2024-02-02 21:24:15.600Z",
"name": "summit_logs",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "gxq1yeld",
"name": "date",
"type": "date",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": "",
"max": ""
}
},
{
"system": false,
"id": "0ykzwuia",
"name": "text",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}
],
"indexes": [],
"listRule": "@request.auth.id != \"\" && @collection.trails.summit_logs.id ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)",
"viewRule": "@request.auth.id != \"\" && @collection.trails.summit_logs.id ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)",
"createRule": "@request.auth.id != \"\"",
"updateRule": "@request.auth.id != \"\" && @collection.trails.summit_logs.id ?= id && (@collection.trails.author = @request.auth.id)",
"deleteRule": "@request.auth.id != \"\" && @collection.trails.summit_logs.id ?= id && (@collection.trails.author = @request.auth.id)",
"options": {}
},
{
"id": "r6gu2ajyidy1x69",
"created": "2024-02-27 11:46:07.367Z",
"updated": "2024-02-27 13:22:52.195Z",
"name": "lists",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "0goi1ipa",
"name": "name",
"type": "text",
"required": true,
"presentable": false,
"unique": false,
"options": {
"min": 1,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "3v3pwnqn",
"name": "description",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "decatj0h",
"name": "avatar",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/png",
"image/vnd.mozilla.apng",
"image/jpeg",
"image/webp",
"image/svg+xml"
],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
},
{
"system": false,
"id": "jqtcrcnq",
"name": "trails",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "e864strfxo14pm4",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
},
{
"system": false,
"id": "kwm6zdet",
"name": "author",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "_pb_users_auth_",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}
],
"indexes": [],
"listRule": "author = @request.auth.id ",
"viewRule": "author = @request.auth.id ",
"createRule": "author = @request.auth.id ",
"updateRule": "author = @request.auth.id ",
"deleteRule": "author = @request.auth.id ",
"options": {}
}
]`
collections := []*models.Collection{}
if err := json.Unmarshal([]byte(jsonData), &collections); err != nil {
return err
}
return daos.New(db).ImportCollections(collections, true, nil)
}, func(db dbx.Builder) error {
return nil
})
}

View File

@@ -0,0 +1,74 @@
package migrations
import (
"encoding/json"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/daos"
m "github.com/pocketbase/pocketbase/migrations"
"github.com/pocketbase/pocketbase/models/schema"
)
func init() {
m.Register(func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("e864strfxo14pm4")
if err != nil {
return err
}
// remove
collection.Schema.RemoveField("mcqce8l9")
// add
new_thumbnail := &schema.SchemaField{}
json.Unmarshal([]byte(`{
"system": false,
"id": "k2giqyjq",
"name": "thumbnail",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}`), new_thumbnail)
collection.Schema.AddField(new_thumbnail)
return dao.SaveCollection(collection)
}, func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("e864strfxo14pm4")
if err != nil {
return err
}
// add
del_thumbnail := &schema.SchemaField{}
json.Unmarshal([]byte(`{
"system": false,
"id": "mcqce8l9",
"name": "thumbnail",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}`), del_thumbnail)
collection.Schema.AddField(del_thumbnail)
// remove
collection.Schema.RemoveField("k2giqyjq")
return dao.SaveCollection(collection)
})
}

View File

@@ -1,71 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const collection = new Collection({
"id": "e864strfxo14pm4",
"created": "2024-01-26 18:46:35.843Z",
"updated": "2024-01-26 18:46:35.843Z",
"name": "trails",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "wquvuytd",
"name": "name",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "jjiidvbm",
"name": "thumbnail",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
},
{
"system": false,
"id": "6kkucam1",
"name": "description",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}
],
"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("e864strfxo14pm4");
return dao.deleteCollection(collection);
})

View File

@@ -1,33 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "k8xdrsyv",
"name": "gpx",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("k8xdrsyv")
return dao.saveCollection(collection)
})

View File

@@ -1,57 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const collection = new Collection({
"id": "kjxvi8asj2igqwf",
"created": "2024-01-26 18:47:30.797Z",
"updated": "2024-01-26 18:47:30.797Z",
"name": "categories",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "38tbd8u4",
"name": "name",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "64dsnxtb",
"name": "img",
"type": "file",
"required": false,
"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("kjxvi8asj2igqwf");
return dao.deleteCollection(collection);
})

View File

@@ -1,33 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "b49obm5u",
"name": "category",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "kjxvi8asj2igqwf",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("b49obm5u")
return dao.saveCollection(collection)
})

View File

@@ -1,69 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const collection = new Collection({
"id": "goeo2ubp103rzp9",
"created": "2024-01-26 18:50:13.695Z",
"updated": "2024-01-26 18:50:13.695Z",
"name": "waypoints",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "2yegzjtk",
"name": "name",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "ygotgxzy",
"name": "lat",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
},
{
"system": false,
"id": "q0ygnxd2",
"name": "lon",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": 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("goeo2ubp103rzp9");
return dao.deleteCollection(collection);
})

View File

@@ -1,39 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "aqbpyawe",
"name": "photos",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/jpeg",
"image/vnd.mozilla.apng",
"image/png",
"image/webp",
"image/svg+xml"
],
"thumbs": [],
"maxSelect": 99,
"maxSize": 5242880,
"protected": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("aqbpyawe")
return dao.saveCollection(collection)
})

View File

@@ -1,92 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "jjiidvbm",
"name": "thumbnail",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/png",
"image/vnd.mozilla.apng",
"image/jpeg",
"image/webp",
"image/svg+xml"
],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "k8xdrsyv",
"name": "gpx",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"application/gpx+xml"
],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "jjiidvbm",
"name": "thumbnail",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "k8xdrsyv",
"name": "gpx",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,33 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "1utgul91",
"name": "author",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "_pb_users_auth_",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("1utgul91")
return dao.saveCollection(collection)
})

View File

@@ -1,50 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "epgmtyxy",
"name": "distance",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": 0,
"max": null,
"noDecimal": false
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "5wxdt3aj",
"name": "elevation_gain",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("epgmtyxy")
// remove
collection.schema.removeField("5wxdt3aj")
return dao.saveCollection(collection)
})

View File

@@ -1,44 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "wquvuytd",
"name": "name",
"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("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "wquvuytd",
"name": "name",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,31 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "8x74ba26",
"name": "location",
"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("e864strfxo14pm4")
// remove
collection.schema.removeField("8x74ba26")
return dao.saveCollection(collection)
})

View File

@@ -1,31 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "ukr9rqz4",
"name": "time",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("ukr9rqz4")
return dao.saveCollection(collection)
})

View File

@@ -1,44 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ukr9rqz4",
"name": "duration",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": 0,
"max": null,
"noDecimal": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ukr9rqz4",
"name": "time",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.listRule = ""
collection.viewRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.listRule = null
collection.viewRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("kjxvi8asj2igqwf")
collection.listRule = ""
collection.viewRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("kjxvi8asj2igqwf")
collection.listRule = null
collection.viewRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,54 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const collection = new Collection({
"id": "dd2l9a4vxpy2ni8",
"created": "2024-01-27 12:23:48.069Z",
"updated": "2024-01-27 12:23:48.069Z",
"name": "summit_book",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "gxq1yeld",
"name": "date",
"type": "date",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": "",
"max": ""
}
},
{
"system": false,
"id": "0ykzwuia",
"name": "text",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}
],
"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("dd2l9a4vxpy2ni8");
return dao.deleteCollection(collection);
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.name = "summit_log"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.name = "summit_book"
return dao.saveCollection(collection)
})

View File

@@ -1,54 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "e1lwowvd",
"name": "summit_logs",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "dd2l9a4vxpy2ni8",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "ppq2sist",
"name": "waypoints",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "goeo2ubp103rzp9",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("e1lwowvd")
// remove
collection.schema.removeField("ppq2sist")
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = ""
collection.viewRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = null
collection.viewRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.listRule = ""
collection.viewRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.listRule = null
collection.viewRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,33 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "xwqncqng",
"name": "author",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "_pb_users_auth_",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
// remove
collection.schema.removeField("xwqncqng")
return dao.saveCollection(collection)
})

View File

@@ -1,33 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "0fz9yp7c",
"name": "trail",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "e864strfxo14pm4",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
// remove
collection.schema.removeField("0fz9yp7c")
return dao.saveCollection(collection)
})

View File

@@ -1,54 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
// remove
collection.schema.removeField("xwqncqng")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "b4zqrqpa",
"name": "trail",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "e864strfxo14pm4",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "xwqncqng",
"name": "author",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "_pb_users_auth_",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))
// remove
collection.schema.removeField("b4zqrqpa")
return dao.saveCollection(collection)
})

View File

@@ -1,33 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
// remove
collection.schema.removeField("0fz9yp7c")
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "0fz9yp7c",
"name": "trail",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "e864strfxo14pm4",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,33 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
// remove
collection.schema.removeField("b4zqrqpa")
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "b4zqrqpa",
"name": "trail",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "e864strfxo14pm4",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,76 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ygotgxzy",
"name": "lat",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": 0,
"max": null,
"noDecimal": false
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "q0ygnxd2",
"name": "lon",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": 0,
"max": null,
"noDecimal": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ygotgxzy",
"name": "lat",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "q0ygnxd2",
"name": "lon",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,31 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "rnjgm2tk",
"name": "icon",
"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("goeo2ubp103rzp9")
// remove
collection.schema.removeField("rnjgm2tk")
return dao.saveCollection(collection)
})

View File

@@ -1,31 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "3xtcjtxv",
"name": "description",
"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("goeo2ubp103rzp9")
// remove
collection.schema.removeField("3xtcjtxv")
return dao.saveCollection(collection)
})

View File

@@ -1,58 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("jjiidvbm")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "mcqce8l9",
"name": "thumbnail",
"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("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "jjiidvbm",
"name": "thumbnail",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"image/png",
"image/vnd.mozilla.apng",
"image/jpeg",
"image/webp",
"image/svg+xml"
],
"thumbs": [],
"maxSelect": 1,
"maxSize": 5242880,
"protected": false
}
}))
// remove
collection.schema.removeField("mcqce8l9")
return dao.saveCollection(collection)
})

View File

@@ -1,76 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ygotgxzy",
"name": "lat",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "q0ygnxd2",
"name": "lon",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ygotgxzy",
"name": "lat",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": 0,
"max": null,
"noDecimal": false
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "q0ygnxd2",
"name": "lon",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": 0,
"max": null,
"noDecimal": false
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.createRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.createRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,84 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "e1lwowvd",
"name": "summit_logs",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "dd2l9a4vxpy2ni8",
"cascadeDelete": true,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ppq2sist",
"name": "waypoints",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "goeo2ubp103rzp9",
"cascadeDelete": true,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "e1lwowvd",
"name": "summit_logs",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "dd2l9a4vxpy2ni8",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ppq2sist",
"name": "waypoints",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "goeo2ubp103rzp9",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.createRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.createRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,84 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "e1lwowvd",
"name": "summit_logs",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "dd2l9a4vxpy2ni8",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ppq2sist",
"name": "waypoints",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "goeo2ubp103rzp9",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "e1lwowvd",
"name": "summit_logs",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "dd2l9a4vxpy2ni8",
"cascadeDelete": true,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}))
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "ppq2sist",
"name": "waypoints",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "goeo2ubp103rzp9",
"cascadeDelete": true,
"minSelect": null,
"maxSelect": null,
"displayFields": null
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.createRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.createRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.name = "summit_logs"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.name = "summit_log"
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.updateRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.updateRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.deleteRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.deleteRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.updateRule = ""
collection.deleteRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.updateRule = null
collection.deleteRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.updateRule = ""
collection.deleteRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.updateRule = null
collection.deleteRule = null
return dao.saveCollection(collection)
})

View File

@@ -1,31 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("_pb_users_auth_")
// remove
collection.schema.removeField("users_name")
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("_pb_users_auth_")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "users_name",
"name": "name",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,27 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "ehrmydva",
"name": "public",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("ehrmydva")
return dao.saveCollection(collection)
})

View File

@@ -1,48 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "1utgul91",
"name": "author",
"type": "relation",
"required": true,
"presentable": false,
"unique": false,
"options": {
"collectionId": "_pb_users_auth_",
"cascadeDelete": true,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "1utgul91",
"name": "author",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "_pb_users_auth_",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))
return dao.saveCollection(collection)
})

View File

@@ -1,24 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.listRule = "author = @request.auth.id || public = true"
collection.viewRule = "author = @request.auth.id || public = true"
collection.createRule = "@request.auth.id != \"\" && (@request.data.author = @request.auth.id)"
collection.updateRule = "author = @request.auth.id "
collection.deleteRule = "author = @request.auth.id "
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.listRule = ""
collection.viewRule = ""
collection.createRule = ""
collection.updateRule = ""
collection.deleteRule = ""
return dao.saveCollection(collection)
})

View File

@@ -1,24 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.createRule = "@request.auth.id != \"\""
collection.updateRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id)"
collection.deleteRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id)"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = ""
collection.viewRule = ""
collection.createRule = ""
collection.updateRule = ""
collection.deleteRule = ""
return dao.saveCollection(collection)
})

View File

@@ -1,24 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.createRule = "@request.auth.id != \"\""
collection.updateRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id)"
collection.deleteRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id)"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.listRule = ""
collection.viewRule = ""
collection.createRule = ""
collection.updateRule = ""
collection.deleteRule = ""
return dao.saveCollection(collection)
})

View File

@@ -1,22 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.summit_logs ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.summit_logs ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.updateRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id)"
collection.deleteRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id)"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.updateRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id)"
collection.deleteRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id)"
return dao.saveCollection(collection)
})

View File

@@ -1,22 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.updateRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id)"
collection.deleteRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id)"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.updateRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id)"
collection.deleteRule = "@request.auth.id != \"\" && @collection.trails.waypoints = id && (@collection.trails.author = @request.auth.id)"
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.viewRule = "@request.auth.id != \"\" "
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\""
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = "@request.auth.id != \"\" "
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = ""
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.viewRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.summit_logs ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.listRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.summit_logs ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = ""
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id "
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id "
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = ""
collection.viewRule = ""
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.viewRule = ""
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.viewRule = "author = @request.auth.id || public = true"
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.viewRule = "author = @request.auth.id || public = true"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
collection.viewRule = ""
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = "@request.auth.id != \"\" && (@collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true))"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
})

View File

@@ -1,16 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && (@collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true))"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id "
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id "
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && (@collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true))"
collection.viewRule = "@request.auth.id != \"\" && (@collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true))"
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id "
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id "
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id "
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id "
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id "
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id "
return dao.saveCollection(collection)
})

View File

@@ -1,22 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.listRule = "@request.auth.id != \"\" && @collection.trails.summit_logs.id ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.viewRule = "@request.auth.id != \"\" && @collection.trails.summit_logs.id ?= id && (@collection.trails.author = @request.auth.id || @collection.trails.public = true)"
collection.updateRule = "@request.auth.id != \"\" && @collection.trails.summit_logs.id ?= id && (@collection.trails.author = @request.auth.id)"
collection.deleteRule = "@request.auth.id != \"\" && @collection.trails.summit_logs.id ?= id && (@collection.trails.author = @request.auth.id)"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("dd2l9a4vxpy2ni8")
collection.listRule = ""
collection.viewRule = ""
collection.updateRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id)"
collection.deleteRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id)"
return dao.saveCollection(collection)
})

View File

@@ -1,50 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "eqeqja1s",
"name": "lat",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "y6dbfyw6",
"name": "lon",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("eqeqja1s")
// remove
collection.schema.removeField("y6dbfyw6")
return dao.saveCollection(collection)
})

View File

@@ -1,18 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.updateRule = "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id && (@collection.trails.author = @request.auth.id)"
collection.deleteRule = "@request.auth.id != \"\" && @collection.trails.waypoints.id ?= id && (@collection.trails.author = @request.auth.id)"
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("goeo2ubp103rzp9")
collection.updateRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id)"
collection.deleteRule = "@request.auth.id != \"\" && @collection.trails.waypoints ?= id && (@collection.trails.author = @request.auth.id)"
return dao.saveCollection(collection)
})