healthchecks_healthchecks/hc/api/migrations/0110_delete_hipchat_pagerteam_zendesk.py
Pēteris Caune 8054191be3
Remove HipChat, Pagerteam, Zendesk channel kinds
HipChat and Pagerteam products have long been shut down,
the Zendesk integration was never fully implemented.
2024-07-18 16:21:45 +03:00

24 lines
643 B
Python

# Generated by Django 5.0.7 on 2024-07-18 13:12
from __future__ import annotations
from typing import Any
from django.apps.registry import Apps
from django.db import migrations
def delete_channels(apps: Apps, schema_editor: Any) -> None:
Channel = apps.get_model("api", "Channel")
Channel.objects.filter(kind="pagerteam").delete()
Channel.objects.filter(kind="hipchat").delete()
Channel.objects.filter(kind="zendesk").delete()
class Migration(migrations.Migration):
dependencies = [
("api", "0109_remove_ping_body"),
]
operations = [migrations.RunPython(delete_channels, migrations.RunPython.noop)]