1# -*- coding: utf-8 -*-
2from django.db import migrations, models
4keywords = {
5 'bts': 'All bug reports and associated discussions',
6 'bts-control': 'Status changes of bug reports',
7 'vcs': 'Commit notices of the VCS repository associated to the package',
8 'upload-source': 'Notifications of sourceful uploads',
9 'upload-binary': 'Notifications of binary-only uploads (made by build daemons)',
10 'summary': 'News about the status of the package',
11 'contact': 'Mails from people contacting the maintainer(s)',
12 'default': 'Anything else that cannot be better classified',
13 'build': 'Notifications of build failures from build daemons',
14 'derivatives': 'Changes made to this package by derivatives',
15 'derivatives-bugs': 'Bug traffic about this package in derivative distributions',
16 'archive': 'Other notifications sent by the archive management tool',
17 'translation': 'Notifications about translations related to the package',
18}
21def describe_keywords(apps, schema_editor):
22 Keyword = apps.get_model('core', 'Keyword')
23 for k, v in keywords.items():
24 Keyword.objects.filter(name=k).update(description=v)
27class Migration(migrations.Migration):
28 dependencies = [
29 ('core', '0006_more_architectures'),
30 ]
31 operations = [
32 migrations.AddField(
33 model_name='Keyword',
34 name='description',
35 field=models.CharField(max_length=256, blank=True),
36 preserve_default=True,
37 ),
38 migrations.RunPython(describe_keywords),
39 ]