-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notifications: remove unused notification (#11573)
- Loading branch information
Showing
2 changed files
with
24 additions
and
16 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
readthedocs/notifications/migrations/0004_remove_unused_notification.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 4.2.16 on 2024-10-29 16:27 | ||
|
||
from django.db import migrations | ||
from django_safemigrate import Safe | ||
|
||
|
||
def remove_unused_notification(apps, schema_editor): | ||
Notification = apps.get_model("notifications", "Notification") | ||
Notification.objects.filter( | ||
message_id="oauth:deploy-key:attached-successfully" | ||
).delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
safe = Safe.after_deploy | ||
|
||
dependencies = [ | ||
("notifications", "0003_notification_indexes"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(remove_unused_notification), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters