layerindex-web/rrs/migrations/0023_recipeupgrade_deleted.py
Paul Eggleton 5540a84434 RRS: Add deleted recipe handling
Now that we're using RecipeSymbols we have the complete list of recipes
that ever existed in a layer. We only want to see the ones that are
valid for the selected milestone, so when a recipe gets deleted (or
renamed or moved outside of the layer subdirectory, if any) we need to
record that - do so using a RecipeUpgrade record with a new field
upgrade_type set to 'R'. Additionally we need to store the file path so
that deletion events (where we don't parse the contents of the recipe,
thus we don't have PN) are easy to match up with RecipeUpgrade records;
naturally we need to keep the paths "up-to-date" when we notice recipe
files being moved around.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-11-21 02:27:39 +13:00

26 lines
730 B
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-08-13 12:17
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rrs', '0022_recipesymbol_finish'),
]
operations = [
migrations.AddField(
model_name='recipeupgrade',
name='filepath',
field=models.CharField(blank=True, max_length=512),
),
migrations.AddField(
model_name='recipeupgrade',
name='upgrade_type',
field=models.CharField(choices=[('U', 'Upgrade'), ('N', 'Delete'), ('R', 'Delete (final)')], db_index=True, default='U', max_length=1),
),
]