Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Beutel committed Jan 27, 2024
1 parent 7ab2f1c commit b302ccd
Show file tree
Hide file tree
Showing 85 changed files with 5,991 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
/pb_data
.env
71 changes: 71 additions & 0 deletions db/pb_migrations/1706294795_created_trails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/// <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);
})
33 changes: 33 additions & 0 deletions db/pb_migrations/1706294826_updated_trails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/// <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)
})
57 changes: 57 additions & 0 deletions db/pb_migrations/1706294850_created_categories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/// <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);
})
33 changes: 33 additions & 0 deletions db/pb_migrations/1706294865_updated_trails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/// <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)
})
69 changes: 69 additions & 0 deletions db/pb_migrations/1706295013_created_waypoints.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/// <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);
})
39 changes: 39 additions & 0 deletions db/pb_migrations/1706295108_updated_trails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/// <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)
})
Loading

0 comments on commit b302ccd

Please sign in to comment.