Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions documentcloud/addons/migrations/0029_addonrun_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.2.2 on 2026-05-15 20:25

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("addons", "0028_addonevent_addonevent_param_site_idx"),
]

operations = [
migrations.AddField(
model_name="addonrun",
name="data",
field=models.JSONField(
blank=True,
default=dict,
help_text="Field to store arbitrary per-run data",
null=True,
verbose_name="data",
),
),
]
7 changes: 7 additions & 0 deletions documentcloud/addons/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,13 @@ class AddOnRun(models.Model):
_("updated at"),
help_text=_("Timestamp of when the add-on run was last updated"),
)
data = models.JSONField(
_("data"),
default=dict,
help_text=_("Field to store arbitrary per-run data"),
blank=True,
null=True,
)

def __str__(self):
return f"Run: {self.addon_id} - {self.created_at}"
Expand Down
1 change: 1 addition & 0 deletions documentcloud/addons/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ class Meta:
"credits_spent",
"created_at",
"updated_at",
"data",
]
extra_kwargs = {
"uuid": {"read_only": True},
Expand Down
Loading