feat: remove the micro bachelors coaching external ID type

These ids have all been removed, the code that used them as long
deprecated, and they were only ever used within products currently
within the purview of 2U.

FIXES: APER-2942
This commit is contained in:
Deborah Kaplan
2023-12-05 16:32:36 +00:00
parent 5e3bc1ca30
commit b8bf8af2c5

View File

@@ -0,0 +1,33 @@
# Generated by Django 3.2.23 on 2023-12-05 16:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("external_user_ids", "0007_remove_mbcoaching_extids"),
]
coaching_name = "mb_coaching"
def create_mb_coaching_type(apps, schema_editor):
"""
Add a MicroBachelors (MB) coaching type
"""
ExternalIdType = apps.get_model("external_user_ids", "ExternalIdType")
ExternalIdType.objects.update_or_create(
name=Migration.coaching_name, description="MicroBachelors Coaching"
)
def delete_mb_coaching_type(apps, schema_editor):
"""
Delete the MicroBachelors (MB) coaching type
"""
ExternalIdType = apps.get_model("external_user_ids", "ExternalIdType")
ExternalIdType.objects.filter(name=Migration.coaching_name).delete()
operations = [
migrations.RunPython(
delete_mb_coaching_type, reverse_code=create_mb_coaching_type
),
]