From 1e7d7da7062d3482b27f6ae8b6f67471677daa9a Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Thu, 3 Dec 2020 17:05:43 +0100
Subject: [PATCH] TMSS-320: renamed hash to hashes

---
 .../tmss/tmssapp/migrations/0001_initial.py   | 32 ++-----------------
 .../src/tmss/tmssapp/models/scheduling.py     |  2 +-
 2 files changed, 3 insertions(+), 31 deletions(-)

diff --git a/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py b/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py
index 14e92dae2b5..4fc9ff08680 100644
--- a/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py
+++ b/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py
@@ -1,4 +1,4 @@
-# Generated by Django 3.0.9 on 2020-12-03 08:10
+# Generated by Django 3.0.9 on 2020-12-03 16:04
 
 from django.conf import settings
 import django.contrib.postgres.fields
@@ -17,34 +17,6 @@ class Migration(migrations.Migration):
     ]
 
     operations = [
-        migrations.CreateModel(
-            name='SchedulingUnitBlueprintSummary',
-            fields=[
-                ('id', models.IntegerField(primary_key=True, serialize=False)),
-                ('sub_id', models.IntegerField()),
-                ('taskblueprint_id', models.IntegerField()),
-                ('task_type', models.CharField(max_length=128)),
-                ('derived_task_status', models.CharField(max_length=128)),
-            ],
-            options={
-                'db_table': 'tmssapp_schedulingunitblueprintsummary',
-                'managed': False,
-            },
-        ),
-        migrations.CreateModel(
-            name='TaskBlueprintSummary',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('taskblueprint_id', models.IntegerField()),
-                ('subtask_id', models.IntegerField()),
-                ('substate', models.CharField(max_length=128)),
-                ('subtask_type', models.CharField(max_length=128)),
-            ],
-            options={
-                'db_table': 'tmssapp_taskblueprintsummary',
-                'managed': False,
-            },
-        ),
         migrations.CreateModel(
             name='Algorithm',
             fields=[
@@ -1326,7 +1298,7 @@ class Migration(migrations.Migration):
         migrations.AddField(
             model_name='dataproducthash',
             name='dataproduct',
-            field=models.ForeignKey(help_text='The dataproduct to which this hash refers.', on_delete=django.db.models.deletion.PROTECT, related_name='hash', to='tmssapp.Dataproduct'),
+            field=models.ForeignKey(help_text='The dataproduct to which this hash refers.', on_delete=django.db.models.deletion.PROTECT, related_name='hashes', to='tmssapp.Dataproduct'),
         ),
         migrations.AddConstraint(
             model_name='dataproductfeedbacktemplate',
diff --git a/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py b/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
index af6094a67bd..1c2a9c7704e 100644
--- a/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
+++ b/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
@@ -424,7 +424,7 @@ class DataproductArchiveInfo(BasicCommon):
 
 
 class DataproductHash(BasicCommon):
-    dataproduct = ForeignKey('Dataproduct', related_name='hash', on_delete=PROTECT, help_text='The dataproduct to which this hash refers.')
+    dataproduct = ForeignKey('Dataproduct', related_name='hashes', on_delete=PROTECT, help_text='The dataproduct to which this hash refers.')
     algorithm = ForeignKey('Algorithm', null=False, on_delete=PROTECT, help_text='Algorithm used (MD5, AES256).')
     hash = CharField(max_length=128, help_text='Hash value.')
 
-- 
GitLab