aboutsummaryrefslogtreecommitdiffstats
path: root/rrs/migrations/0016_rmh_layerbranch_nonnull.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-04-11 11:01:33 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:53 +1200
commit7606664eeb7a653db9c01c7dbd2bfc11e480f349 (patch)
tree191041b7d14b59b8a2aa45f5ca0a6f3659bf3eca /rrs/migrations/0016_rmh_layerbranch_nonnull.py
parentda3bfff3a1d42d0db144565eaad3710df833d0b5 (diff)
downloadopenembedded-core-contrib-7606664eeb7a653db9c01c7dbd2bfc11e480f349.tar.gz
rrs: link maintenance/upstream history to layerbranch
RecipeUpstreamHistory was not linked to the layer it was produced from, which meant that it wasn't easy to query for a different maintenance plan (i.e. a different layer) and thus the maintenance plan selection on the recipe list didn't really work. Add a link field, populate it in a migration and then make it required. We had added a link earlier from RecipeMaintainerHistory to LayerBranch but it was optional; for the same reasons we now populate it and make it required. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'rrs/migrations/0016_rmh_layerbranch_nonnull.py')
-rw-r--r--rrs/migrations/0016_rmh_layerbranch_nonnull.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/rrs/migrations/0016_rmh_layerbranch_nonnull.py b/rrs/migrations/0016_rmh_layerbranch_nonnull.py
new file mode 100644
index 0000000000..5c192fd571
--- /dev/null
+++ b/rrs/migrations/0016_rmh_layerbranch_nonnull.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('rrs', '0015_rmh_layerbranch_populate'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='recipemaintainerhistory',
+ name='layerbranch',
+ field=models.ForeignKey(to='layerindex.LayerBranch'),
+ ),
+ ]