@@ -0,0 +1,1233 @@
+# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.27 on 2020-01-22 09:46%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0Afrom oscar.apps.catalogue.categories import create_from_breadcrumbs%0Afrom oscar.core.loading import get_model%0A%0ACategory = get_model('catalogue', 'Category')%0A%0ACOUPON_CATEGORY_NAME = 'Coupons'%0A%0AEDX_EMPLOYEE_COUPON_CATEGORY = 'edX Employee Request'%0A%0Adef create_edx_employee_category(apps, schema_editor):%0A    %22%22%22Create edX employee coupon category.%22%22%22%0A    Category.skip_history_when_saving = True%0A    create_from_breadcrumbs(%0A        '%7B%7D %3E %7B%7D'.format(%0A            COUPON_CATEGORY_NAME, EDX_EMPLOYEE_COUPON_CATEGORY%0A        )%0A    )%0A%0A%0Adef remove_edx_employee_category(apps, schema_editor):%0A    %22%22%22Remove edX employee coupon category.%22%22%22%0A    Category.skip_history_when_saving = True%0A    Category.objects.get(%0A        name=COUPON_CATEGORY_NAME%0A    ).get_children().filter(%0A        name=EDX_EMPLOYEE_COUPON_CATEGORY%0A    ).delete()%0A%0A%0Aclass Migration(migrations.Migration):%0A    dependencies = %5B%0A        ('catalogue', '0044_add_enterprisecontractmetadata_product_attribute'),%0A    %5D%0A%0A    operations = %5B%0A        migrations.RunPython(create_edx_employee_category, remove_edx_employee_category)%0A    %5D%0A

Add new coupon category for edX.