From 86db0bd7f213c192214b4e3dc4d42b0374004fc6 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Fri, 5 Feb 2016 11:44:57 +0000 Subject: [PATCH] bitbake: toaster: orm Add last_updated field to CustomImageRecipe Field to keep track of when the package list for the CustomImageRecipe was last updated from a build. (Bitbake rev: 4bd4e49f13a7625997a43f3b2e67ed42c3c8e08b) Signed-off-by: Michael Wood Signed-off-by: brian avery Signed-off-by: Richard Purdie --- .../0006_customimagerecipe_last_updated.py | 19 +++++++++++++++++++ bitbake/lib/toaster/orm/models.py | 1 + 2 files changed, 20 insertions(+) create mode 100644 bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py diff --git a/bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py b/bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py new file mode 100644 index 0000000000..b7a301b541 --- /dev/null +++ b/bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('orm', '0005_auto_20160118_1055'), + ] + + operations = [ + migrations.AddField( + model_name='customimagerecipe', + name='last_updated', + field=models.DateTimeField(default=None, null=True), + ), + ] diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 9bfc00d667..ee8f1f7166 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1446,6 +1446,7 @@ class CustomImageRecipe(Recipe): search_allowed_fields = ['name'] base_recipe = models.ForeignKey(Recipe, related_name='based_on_recipe') project = models.ForeignKey(Project) + last_updated = models.DateTimeField(null=True, default=None) def get_last_successful_built_target(self): """ Return the last successful built target object if one exists