update pocketbase schema,

This commit is contained in:
louiscklaw
2025-04-16 12:43:54 +08:00
parent 08e5677c0b
commit 8bc4a37e8e
23 changed files with 5485 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
module.exports = $app => {
const ASSETS_DIR = '/pb_hooks/assets';
const getAsset = name => $filesystem.fileFromPath(ASSETS_DIR + '/' + name);
for (let i = 0; i < 3; i++) {
let t1_collection = $app.findCollectionByNameOrId('t1');
let record = new Record(t1_collection);
record.set('hello', 'world');
let test_png = getAsset('1.png');
record.set('test_file', test_png);
$app.save(record);
}
};