Skip to content

Commit

Permalink
Upgrade jhove-1.32
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhwaniartefact committed Oct 29, 2024
1 parent b1e7591 commit 775c269
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/dashboard/src/fpr/migrations/0045_update_jhove_132.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from django.db import migrations

JHOVE_TOOL_ID = "085d8690-93b7-4d31-84f7-2c5f4cbf6735"


def data_migration_up(apps, schema_editor):
"""Upgrade jhove tool version."""
FPTool = apps.get_model("fpr", "FPTool")
FPTool.objects.filter(uuid=JHOVE_TOOL_ID).update(version="1.32", slug="jhove-132")


def data_migration_down(apps, schema_editor):
FPTool = apps.get_model("fpr", "FPTool")
FPTool.objects.filter(uuid=JHOVE_TOOL_ID).update(version="1.26", slug="jhove-126")


class Migration(migrations.Migration):
dependencies = [("fpr", "0044_remove_fits")]
operations = [migrations.RunPython(data_migration_up, data_migration_down)]

0 comments on commit 775c269

Please sign in to comment.