add listas, items
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
/pb_data
|
||||
/pb_migrations
|
||||
BIN
pb_data/data.db
Normal file
BIN
pb_data/data.db
Normal file
Binary file not shown.
BIN
pb_data/logs.db
Normal file
BIN
pb_data/logs.db
Normal file
Binary file not shown.
20585
pb_data/types.d.ts
vendored
Normal file
20585
pb_data/types.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
65
pb_migrations/1724967084_created_listas.js
Normal file
65
pb_migrations/1724967084_created_listas.js
Normal file
@@ -0,0 +1,65 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const collection = new Collection({
|
||||
"id": "0f66m7amfl25mue",
|
||||
"created": "2024-08-29 21:31:24.549Z",
|
||||
"updated": "2024-08-29 21:31:24.549Z",
|
||||
"name": "listas",
|
||||
"type": "base",
|
||||
"system": false,
|
||||
"schema": [
|
||||
{
|
||||
"system": false,
|
||||
"id": "bg2sxtmm",
|
||||
"name": "nombre",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": 120,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "e3ay9ul4",
|
||||
"name": "descripcion",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": 250,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "kxreowp9",
|
||||
"name": "completado",
|
||||
"type": "bool",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {}
|
||||
}
|
||||
],
|
||||
"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("0f66m7amfl25mue");
|
||||
|
||||
return dao.deleteCollection(collection);
|
||||
})
|
||||
33
pb_migrations/1724967101_updated_listas.js
Normal file
33
pb_migrations/1724967101_updated_listas.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "wsnslvx5",
|
||||
"name": "field",
|
||||
"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("0f66m7amfl25mue")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("wsnslvx5")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
48
pb_migrations/1724967112_updated_listas.js
Normal file
48
pb_migrations/1724967112_updated_listas.js
Normal file
@@ -0,0 +1,48 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "wsnslvx5",
|
||||
"name": "field",
|
||||
"type": "relation",
|
||||
"required": true,
|
||||
"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("0f66m7amfl25mue")
|
||||
|
||||
// update
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "wsnslvx5",
|
||||
"name": "field",
|
||||
"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)
|
||||
})
|
||||
27
pb_migrations/1724967152_updated_listas.js
Normal file
27
pb_migrations/1724967152_updated_listas.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("kxreowp9")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "kxreowp9",
|
||||
"name": "completado",
|
||||
"type": "bool",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
16
pb_migrations/1724967779_updated_listas.js
Normal file
16
pb_migrations/1724967779_updated_listas.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "id != \"\""
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = null
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
16
pb_migrations/1724967957_updated_listas.js
Normal file
16
pb_migrations/1724967957_updated_listas.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "@request.auth.id= @collection.listas.field.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "id != \"\""
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
16
pb_migrations/1724968053_updated_listas.js
Normal file
16
pb_migrations/1724968053_updated_listas.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "\"eidph18vu0r30yi\"= @collection.listas.field.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "@request.auth.id= @collection.listas.field.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
16
pb_migrations/1724968074_updated_listas.js
Normal file
16
pb_migrations/1724968074_updated_listas.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "\"eidph18vu0r30yi\"= \"eidph18vu0r30yi\""
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "\"eidph18vu0r30yi\"= @collection.listas.field.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
16
pb_migrations/1724968153_updated_listas.js
Normal file
16
pb_migrations/1724968153_updated_listas.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "field = @request.auth.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "\"eidph18vu0r30yi\"= \"eidph18vu0r30yi\""
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
53
pb_migrations/1724972084_created_item.js
Normal file
53
pb_migrations/1724972084_created_item.js
Normal file
@@ -0,0 +1,53 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const collection = new Collection({
|
||||
"id": "kao3uf79lkj9apb",
|
||||
"created": "2024-08-29 22:54:44.152Z",
|
||||
"updated": "2024-08-29 22:54:44.152Z",
|
||||
"name": "item",
|
||||
"type": "base",
|
||||
"system": false,
|
||||
"schema": [
|
||||
{
|
||||
"system": false,
|
||||
"id": "mfyxiges",
|
||||
"name": "field",
|
||||
"type": "relation",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"collectionId": "0f66m7amfl25mue",
|
||||
"cascadeDelete": false,
|
||||
"minSelect": null,
|
||||
"maxSelect": 1,
|
||||
"displayFields": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"system": false,
|
||||
"id": "3xoax54x",
|
||||
"name": "completado",
|
||||
"type": "bool",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {}
|
||||
}
|
||||
],
|
||||
"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("kao3uf79lkj9apb");
|
||||
|
||||
return dao.deleteCollection(collection);
|
||||
})
|
||||
31
pb_migrations/1724972111_updated_item.js
Normal file
31
pb_migrations/1724972111_updated_item.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("kao3uf79lkj9apb")
|
||||
|
||||
// add
|
||||
collection.schema.addField(new SchemaField({
|
||||
"system": false,
|
||||
"id": "pawur2j5",
|
||||
"name": "nombre",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": 100,
|
||||
"pattern": ""
|
||||
}
|
||||
}))
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("kao3uf79lkj9apb")
|
||||
|
||||
// remove
|
||||
collection.schema.removeField("pawur2j5")
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
16
pb_migrations/1724972751_updated_listas.js
Normal file
16
pb_migrations/1724972751_updated_listas.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "field = @request.auth.listas_via_field.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "field = @request.auth.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
16
pb_migrations/1724972782_updated_listas.js
Normal file
16
pb_migrations/1724972782_updated_listas.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "field = @request.auth.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue")
|
||||
|
||||
collection.listRule = "field = @request.auth.listas_via_field.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
16
pb_migrations/1724972827_updated_item.js
Normal file
16
pb_migrations/1724972827_updated_item.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("kao3uf79lkj9apb")
|
||||
|
||||
collection.listRule = "field.field.id = @request.auth.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("kao3uf79lkj9apb")
|
||||
|
||||
collection.listRule = null
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
Reference in New Issue
Block a user