Skip to content

Commit

Permalink
meta
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhvjain committed Mar 6, 2025
1 parent fb51e76 commit dc1fedf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "beanbagdb",
"version": "0.6.6",
"version": "0.6.7",
"description": "A JS library to introduce a schema layer to a No-SQL local database",
"main": "src/index.js",
"module": "src/index.js",
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ export class BeanBagDB {

// add a new log
let new_log_doc = this._get_blank_doc("system_log")
new_log_doc.data = {text,data:{steps},time:this.util_get_now_unix_timestamp(),app:app_data.app_id}
new_log_doc.data = {text,steps,app:app_data.app_id}
new_log_doc.meta.title = text
await this.db_api.insert(new_log_doc);
console.log("init logged")

Expand Down
12 changes: 11 additions & 1 deletion src/system_schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ export const default_app = {

// this is not stored in the DB. only for validating the metadata during doc update
export const editable_metadata_schema = {
additionalProperties: false,
additionalProperties: true,
type: "object",
properties: {
tags: {
Expand All @@ -454,6 +454,16 @@ export const editable_metadata_schema = {
title:{
type:"string",
maxLength:10000
},
ref:{
type:"object",
"description":"This can be used by apps to add additional data for later user like version ",
default:{}
},
location:{
type:"object",
"description":"this can be used to add created_from and last_updated_from location to the doc",
default:{}
}
},
};
Expand Down

0 comments on commit dc1fedf

Please sign in to comment.