From 44aa397fbef0da0ffe0b073288af1f7429f3fd3b Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 1 Apr 2019 15:20:31 +1300 Subject: [PATCH] Add sha256sum to Source model Allow us to record a checksum for local sources (and potentially remote ones if it is recorded in the recipe). This just adds the field, but doesn't populate it. Signed-off-by: Paul Eggleton --- .../migrations/0034_source_sha256sum.py | 20 +++++++++++++++++++ layerindex/models.py | 1 + 2 files changed, 21 insertions(+) create mode 100644 layerindex/migrations/0034_source_sha256sum.py diff --git a/layerindex/migrations/0034_source_sha256sum.py b/layerindex/migrations/0034_source_sha256sum.py new file mode 100644 index 0000000..2349297 --- /dev/null +++ b/layerindex/migrations/0034_source_sha256sum.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.16 on 2019-04-01 03:20 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('layerindex', '0032_patchdisposition'), + ] + + operations = [ + migrations.AddField( + model_name='source', + name='sha256sum', + field=models.CharField(blank=True, max_length=64), + ), + ] diff --git a/layerindex/models.py b/layerindex/models.py index 7c5f44c..2c6449f 100644 --- a/layerindex/models.py +++ b/layerindex/models.py @@ -524,6 +524,7 @@ class Recipe(models.Model): class Source(models.Model): recipe = models.ForeignKey(Recipe) url = models.CharField(max_length=255) + sha256sum = models.CharField(max_length=64, blank=True) def web_url(self): def drop_dotgit(url):