aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/migrations
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-09-19 11:29:39 +0100
committerGravatar Chris Lovering <[email protected]>2023-09-19 11:33:43 +0100
commitbe6b69824fbcfdc1c73f17eefa31e81f04b704a3 (patch)
tree7806dc3833c60af40b38dc7d7abdc37023191d06 /pydis_site/apps/api/migrations
parentMerge pull request #1108 from python-discord/update-deploy-ci-path (diff)
Remove the redirect FilterList on migration
This redirect filter list does not have any filters, nor does it have a bot implementation. It is something that we were working on, but has been stalled for a while. The presence of this filter list also causes the bot to warn on startup due to it finding a filter list with no implementation. This commit removes the FilterList, which can be added back if/when we support this filter type in bot.
Diffstat (limited to 'pydis_site/apps/api/migrations')
-rw-r--r--pydis_site/apps/api/migrations/0092_remove_redirect_filter_list.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/pydis_site/apps/api/migrations/0092_remove_redirect_filter_list.py b/pydis_site/apps/api/migrations/0092_remove_redirect_filter_list.py
new file mode 100644
index 00000000..69dd99d0
--- /dev/null
+++ b/pydis_site/apps/api/migrations/0092_remove_redirect_filter_list.py
@@ -0,0 +1,16 @@
+from django.db import migrations
+from django.apps.registry import Apps
+from django.db.backends.base.schema import BaseDatabaseSchemaEditor
+
+
+def forward(apps: Apps, _: BaseDatabaseSchemaEditor) -> None:
+ apps.get_model("api", "FilterList").objects.filter(name="redirect").delete()
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("api", "0091_antispam_filter_list"),
+ ]
+
+ operations = [migrations.RunPython(forward)]