Add doc meta data. (#4442)

### What problem does this PR solve?

#3690

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Kevin Hu
2025-01-10 19:06:59 +08:00
committed by GitHub
parent 4dde73f897
commit 7d909d4d1b
5 changed files with 56 additions and 13 deletions

View File

@ -760,6 +760,7 @@ class Document(DataBaseModel):
default="")
process_begin_at = DateTimeField(null=True, index=True)
process_duation = FloatField(default=0)
meta_fields = JSONField(null=True, default={})
run = CharField(
max_length=1,
@ -1112,3 +1113,10 @@ def migrate_db():
)
except Exception:
pass
try:
migrate(
migrator.add_column("document", "meta_fields",
JSONField(null=True, default={}))
)
except Exception:
pass