from django.db import migrations, models


class Migration(migrations.Migration):
    """
    Upgrades stop borrowing a catalogue row.

    Server and plan upgrades have nothing in products or services to point at,
    so the Points At field on the Upgrade form was being filled with whatever
    happened to be nearby. This gives them a field of their own. Nothing is
    removed and no existing row is touched.
    """

    dependencies = [
        ('marketplace', '0003_plugin_section_marketplace'),
    ]

    operations = [
        migrations.AddField(
            model_name='plugin',
            name='upgrade_key',
            field=models.CharField(
                blank=True, max_length=40,
                choices=[
                    ('server_dedicated', 'Dedicated Server'),
                    ('server_virtual', 'Virtual Server'),
                    ('server_cloud', 'Cloud Server'),
                    ('server_application', 'Application Server'),
                    ('server_mail', 'Mail Server'),
                    ('server_media', 'Media Server'),
                    ('plan_standard', 'Standard'),
                    ('plan_signature', 'Signature'),
                    ('plan_store', 'Store'),
                    ('plan_customised', 'Customised'),
                ],
                help_text='Server type or plan tier this upgrade moves the site to',
            ),
        ),
    ]
