layerindex-web/rrs/migrations/0014_reup_layerbranch_nonnull.py
Paul Eggleton 7606664eeb 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>
2018-05-04 23:57:53 +12:00

20 lines
440 B
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rrs', '0013_reup_layerbranch_populate'),
]
operations = [
migrations.AlterField(
model_name='recipeupstreamhistory',
name='layerbranch',
field=models.ForeignKey(to='layerindex.LayerBranch'),
),
]