From f5653261b497a6d4c7b84c30ae3ba673132803dd Mon Sep 17 00:00:00 2001
From: Vermaas <vermaas@astron.nl>
Date: Fri, 31 Mar 2023 11:52:33 +0200
Subject: [PATCH] make logentry.description field larger add workflow.prefetch
 field

---
 .../migrations/0021_auto_20230331_1151.py     | 23 +++++++++++++++++++
 atdb/taskdatabase/models.py                   |  3 ++-
 .../templates/taskdatabase/index.html         |  2 +-
 3 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100644 atdb/taskdatabase/migrations/0021_auto_20230331_1151.py

diff --git a/atdb/taskdatabase/migrations/0021_auto_20230331_1151.py b/atdb/taskdatabase/migrations/0021_auto_20230331_1151.py
new file mode 100644
index 00000000..ab730098
--- /dev/null
+++ b/atdb/taskdatabase/migrations/0021_auto_20230331_1151.py
@@ -0,0 +1,23 @@
+# Generated by Django 3.1.4 on 2023-03-31 09:51
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('taskdatabase', '0020_auto_20230327_1029'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='workflow',
+            name='prefetch',
+            field=models.BooleanField(default=True, null=True),
+        ),
+        migrations.AlterField(
+            model_name='logentry',
+            name='description',
+            field=models.CharField(blank=True, max_length=255, null=True),
+        ),
+    ]
diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py
index 082876b9..0fe43a69 100644
--- a/atdb/taskdatabase/models.py
+++ b/atdb/taskdatabase/models.py
@@ -21,6 +21,7 @@ class Workflow(models.Model):
     oi_size_fraction = models.FloatField(blank=True, null=True)
     meta_scheduling = models.JSONField(null=True, blank=True)
     default_parameters = models.JSONField(null=True, blank=True)
+    prefetch = models.BooleanField(null=True, default=True)
 
     def __str__(self):
         return str(self.id)
@@ -254,7 +255,7 @@ class LogEntry(models.Model):
     step_name = models.CharField(max_length=30, blank=True, null=True)
     timestamp = models.DateTimeField(blank=True, null=True)
     status = models.CharField(max_length=50,default="defined", blank=True, null=True)
-    description = models.CharField(max_length=100, blank=True, null=True)
+    description = models.CharField(max_length=255, blank=True, null=True)
     size_processed = models.PositiveBigIntegerField(default=0, null=True, blank=True)
     # relationships
     task = models.ForeignKey(Task, related_name='log_entries', on_delete=models.CASCADE, null=False)
diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html
index 3a92ca2d..02f3c9ee 100644
--- a/atdb/taskdatabase/templates/taskdatabase/index.html
+++ b/atdb/taskdatabase/templates/taskdatabase/index.html
@@ -34,7 +34,7 @@
         {% include 'taskdatabase/pagination.html' %}
        </div>
     </div>
-    <p class="footer"> Version 27 March 2023
+    <p class="footer"> Version 31 March 2023
 
 </div>
 
-- 
GitLab