layerindex-web/rrs/migrations/0002_maintenanceplan.py
Paul Eggleton 1f49943aee rrs: add maintenance plans
The MaintenancePlan will provide some context for the RRS records so we
can effectively enable RRS functionality only on certain layers where we
want it. You can also consider the maintenance of multiple layers
together under a single plan if desired.

Here we add just the MaintenancePlan and the corresponding migration;
a non-null link from the Release requires a separate migration and thus
that will be done in a separate commit.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:52 +12:00

34 lines
1.3 KiB
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('layerindex', '0010_add_dependencies'),
('rrs', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='MaintenancePlan',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=50, unique=True)),
('description', models.TextField(blank=True)),
('updates_enabled', models.BooleanField(verbose_name='Enable updates', default=True, help_text='Enable automatically updating metadata for this plan via the update scripts')),
],
),
migrations.CreateModel(
name='MaintenancePlanLayerBranch',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('layerbranch', models.ForeignKey(to='layerindex.LayerBranch')),
('plan', models.ForeignKey(to='rrs.MaintenancePlan')),
],
options={'verbose_name_plural': 'Maintenance plan layer branches'},
),
]