Compare commits

...

3 Commits

10 changed files with 63 additions and 273 deletions

View File

@@ -1,4 +1,4 @@
// Generated at: 2025-05-11T08:58:29.867Z
// Generated at: 2025-05-12T06:02:53.613Z
//
@@ -114,7 +114,6 @@ Table Notifications {
id text [pk, not null]
read boolean
type text
author text
job text
description text
NOTI_ID text
@@ -122,6 +121,10 @@ Table Notifications {
updated datetime
to_user_id integer [ref: > UserMetas.id] // relation704048736
from_user_id integer [ref: > UserMetas.id] // relation556806202
author integer [ref: > UserMetas.id] // relation3182418120
content text
company text
link varchar
}
//

View File

@@ -1057,16 +1057,6 @@
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "json3182418120",
"maxSize": 0,
"name": "author",
"presentable": false,
"required": false,
"system": false,
"type": "json"
},
{
"hidden": false,
"id": "json4225294584",
@@ -1150,6 +1140,51 @@
"required": false,
"system": false,
"type": "relation"
},
{
"cascadeDelete": false,
"collectionId": "pbc_1305841361",
"hidden": false,
"id": "relation3182418120",
"maxSelect": 1,
"minSelect": 0,
"name": "author",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"convertURLs": false,
"hidden": false,
"id": "editor4274335913",
"maxSize": 0,
"name": "content",
"presentable": false,
"required": false,
"system": false,
"type": "editor"
},
{
"hidden": false,
"id": "json1337919823",
"maxSize": 0,
"name": "company",
"presentable": false,
"required": false,
"system": false,
"type": "json"
},
{
"exceptDomains": null,
"hidden": false,
"id": "url917281265",
"name": "link",
"onlyDomains": null,
"presentable": false,
"required": false,
"system": false,
"type": "url"
}
],
"indexes": [],

View File

@@ -1,2 +1,3 @@
#
volumes
pb_migrations

View File

@@ -1174,6 +1174,17 @@
"required": false,
"system": false,
"type": "json"
},
{
"exceptDomains": null,
"hidden": false,
"id": "url917281265",
"name": "link",
"onlyDomains": null,
"presentable": false,
"required": false,
"system": false,
"type": "url"
}
],
"indexes": [],

View File

@@ -1,136 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1305841361");
return app.delete(collection);
}, (app) => {
const collection = new Collection({
"createRule": "",
"deleteRule": "",
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"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": "",
"hidden": false,
"id": "text4192936109",
"max": 0,
"min": 0,
"name": "helloworld",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "json3622966325",
"maxSize": 0,
"name": "meta",
"presentable": false,
"required": false,
"system": false,
"type": "json"
},
{
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2809058197",
"maxSelect": 1,
"minSelect": 0,
"name": "user_id",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"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"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2744374011",
"max": 0,
"min": 0,
"name": "state",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "file376926767",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [],
"name": "avatar",
"presentable": false,
"protected": false,
"required": false,
"system": false,
"thumbs": [],
"type": "file"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1466534506",
"max": 0,
"min": 0,
"name": "role",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}
],
"id": "pbc_1305841361",
"indexes": [],
"listRule": "",
"name": "UserMetas",
"system": false,
"type": "base",
"updateRule": "",
"viewRule": ""
});
return app.save(collection);
})

View File

@@ -1,45 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1305841361")
// add field
collection.fields.addAt(9, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// add field
collection.fields.addAt(10, new Field({
"exceptDomains": null,
"hidden": false,
"id": "email3885137012",
"name": "email",
"onlyDomains": null,
"presentable": false,
"required": false,
"system": false,
"type": "email"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1305841361")
// remove field
collection.fields.removeById("text1579384326")
// remove field
collection.fields.removeById("email3885137012")
return app.save(collection)
})

View File

@@ -1,29 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
// add field
collection.fields.addAt(11, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1146066909",
"max": 0,
"min": 0,
"name": "phone",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
// remove field
collection.fields.removeById("text1146066909")
return app.save(collection)
})

View File

@@ -1,29 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1305841361")
// add field
collection.fields.addAt(11, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1146066909",
"max": 0,
"min": 0,
"name": "phone",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1305841361")
// remove field
collection.fields.removeById("text1146066909")
return app.save(collection)
})

View File

@@ -1,20 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1413424569")
// update collection data
unmarshal({
"name": "Teachers_xxx"
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1413424569")
// update collection data
unmarshal({
"name": "Teachers"
}, collection)
return app.save(collection)
})

View File

@@ -6,11 +6,10 @@ docker compose kill
docker compose down
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d pocketbase api_ts --remove-orphans
# docker compose logs -f pocketbase api_ts
docker compose logs pocketbase
echo "done"
echo "please run yourself !!!!"
echo "nodemon -w /pb_hooks --exec "pocketbase seed""
echo ""