<reponame>uktrade/directory-cms<filename>export_readiness/migrations/0058_auto_20190912_1326.py
# Generated by Django 2.2.4 on 2019-09-12 13:26

from django.db import migrations


INDUSTRY_NAMES = (
    'Advanced manufacturing',
    'Aerospace',
    'Agri-technology',
    'Automotive',
    'Biotechnology',
    'Cleantech',
    'Construction ',
    'Consumer products',
    'Cyber security',
    'E-commerce',
    'Education',
    'Energy',
    'Engineering',
    'Financial services',
    'Fintech',
    'Food and drink',
    'Healthcare',
    'Infrastructure',
    'International organisations',
    'Life sciences',
    'Low carbon',
    'Luxury',
    'Offshore wind',
    'Oil and gas',
    'Pharmaceuticals',
    'Professional services',
    'Renewables',
    'Retail',
    'Safety',
    'Security',
    'Smart cities',
    'Technology',
    'Training',
)


def create_industry_tags(apps, schema_editor):
    IndustryTag = apps.get_model('export_readiness', 'IndustryTag')
    objs = (IndustryTag(name=name) for name in INDUSTRY_NAMES)
    IndustryTag.objects.bulk_create(objs)


def delete_industry_tags(apps, schema_editor):
    IndustryTag = apps.get_model('export_readiness', 'IndustryTag')
    IndustryTag.objects.all().delete()


class Migration(migrations.Migration):

    dependencies = [
        ('export_readiness', '0057_auto_20190912_1326'),
    ]

    operations = [
        migrations.RunPython(create_industry_tags, reverse_code=delete_industry_tags, elidable=True)
    ]

# Generated by Django 2.2.4 on 2019-09-12 13:26

from django.db import migrations


INDUSTRY_NAMES = (
    'Advanced manufacturing',
    'Aerospace',
    'Agri-technology',
    'Automotive',
    'Biotechnology',
    'Cleantech',
    'Construction ',
    'Consumer products',
    'Cyber security',
    'E-commerce',
    'Education',
    'Energy',
    'Engineering',
    'Financial services',
    'Fintech',
    'Food and drink',
    'Healthcare',
    'Infrastructure',
    'International organisations',
    'Life sciences',
    'Low carbon',
    'Luxury',
    'Offshore wind',
    'Oil and gas',
    'Pharmaceuticals',
    'Professional services',
    'Renewables',
    'Retail',
    'Safety',
    'Security',
    'Smart cities',
    'Technology',
    'Training',
)


def create_industry_tags(apps, schema_editor):
    IndustryTag = apps.get_model('export_readiness', 'IndustryTag')
    objs = (IndustryTag(name=name) for name in INDUSTRY_NAMES)
    IndustryTag.objects.bulk_create(objs)


def delete_industry_tags(apps, schema_editor):
    IndustryTag = apps.get_model('export_readiness', 'IndustryTag')
    IndustryTag.objects.all().delete()


class Migration(migrations.Migration):

    dependencies = [
        ('export_readiness', '0057_auto_20190912_1326'),
    ]

    operations = [
        migrations.RunPython(create_industry_tags, reverse_code=delete_industry_tags, elidable=True)
    ]
# Generated by Django 2.2.4 on 2019-09-12 13:26