Repository: mdn/kuma

Issue:
Delete BCSignal data
**Summary**
Delete the model, the Admin model, and all the data. 


Since https://github.com/mdn/kuma/issues/7721 we shut down the ability to collect more [BC Signals](https://developer.mozilla.org/admin/wiki/bcsignal/). As time passes, the (good/valid) records in there are slowly getting less and less relevant. 


Discussion:
@Elchi3 @ddbeck What do you think about this data? The data is backed-up, so there's no question about losing it. Is it useful to keep for a while longer, or might we be able to delete it?
Peter is right about the feedback to outdate over time.

Also, as said in https://github.com/mdn/kuma/issues/7721#issuecomment-757452921, the data isn't really meant to be public (I guess it is PII data as you could identify people given some of the info they provide in free form). So, I guess I would need to sign an NDA or so with the Mozilla Corporation and so that seems not worth it for me ;-)

I'd say delete it or export it to a google spreadsheet and let it live there until it gets archived or so. 
A Google Spreadsheet is a great idea! Much more convenient than a CSV file and Google has a great system for authorization. Let's do that!
@Elchi3 let me know, by email, which email I should use for you to give you outside-Mozilla access to 
https://docs.google.com/spreadsheets/d/1Hg6jvOYl4t3MgNlGFRJuP95vyA9aNWxODskNm8QyVXQ/edit#gid=616112047

With that exported, we can at least know that the data is safe (in double meaning: secure and not lost).

Resolving patch:
diff --git a/kuma/wiki/admin.py b/kuma/wiki/admin.py
--- a/kuma/wiki/admin.py
+++ b/kuma/wiki/admin.py
@@ -21,7 +21,6 @@
 from .decorators import check_readonly
 from .forms import RevisionAkismetSubmissionAdminForm
 from .models import (
-    BCSignal,
     Document,
     DocumentDeletionLog,
     DocumentSpamAttempt,
@@ -654,20 +653,3 @@ class EditorToolbarAdmin(admin.ModelAdmin):
     list_display = ["name", "creator", "default"]
     list_filters = ["default"]
     raw_id_fields = ["creator"]
-
-
-@admin.register(BCSignal)
-class BCSignalAdmin(admin.ModelAdmin):
-    list_display = ["pk", "document", "submitted_at"]
-    list_filter = ["submitted_at"]
-    search_fields = ["document__slug", "document__title", "document__locale"]
-    readonly_fields = ["document", "browsers", "feature"]
-
-    def get_queryset(self, request):
-        only = ("document__slug", "document__title", "document__locale", "submitted_at")
-        return (
-            super(BCSignalAdmin, self)
-            .get_queryset(request)
-            .select_related("document")
-            .only(*only)
-        )
diff --git a/kuma/wiki/migrations/0014_delete_bcsignal.py b/kuma/wiki/migrations/0014_delete_bcsignal.py
new file mode 100644
--- /dev/null
+++ b/kuma/wiki/migrations/0014_delete_bcsignal.py
@@ -0,0 +1,16 @@
+# Generated by Django 2.2.16 on 2021-01-19 14:11
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ("wiki", "0013_auto_20210115_0531"),
+    ]
+
+    operations = [
+        migrations.DeleteModel(
+            name="BCSignal",
+        ),
+    ]
diff --git a/kuma/wiki/models.py b/kuma/wiki/models.py
--- a/kuma/wiki/models.py
+++ b/kuma/wiki/models.py
@@ -2068,38 +2068,3 @@ class DocumentSpamAttempt(SpamAttempt):
 
     def __str__(self):
         return f"{self.slug} ({self.title})"
-
-
-class BCSignal(models.Model):
-    """Model to keep track of the BC signals."""
-
-    # NOTE! The BCSignal data is deprecated. We no longer accept them coming
-    # in. The only reason the model is not deleted yet is to keep it a little
-    # bit longer. For historical reasons.
-    # We can delete this model (and the BCSignalAdmin class) and even delete
-    # the data from the MySQL when we're really comfortable that it will
-    # never be useful again. Also, we do have backups of the MySQL database
-    # if we really change our minds.
-    # See https://github.com/mdn/kuma/issues/7728
-
-    document = models.ForeignKey(
-        Document,
-        related_name="bc_signals",
-        null=True,
-        blank=True,
-        verbose_name=_("Document (optional)"),
-        on_delete=models.SET_NULL,
-    )
-
-    browsers = models.CharField(max_length=255, default="", blank=True)
-    feature = models.CharField(max_length=255, default="", blank=True)
-    explanation = models.TextField(default="", blank=True)
-    supporting_material = models.TextField(default="", blank=True)
-
-    submitted_at = models.DateTimeField(auto_now_add=True)
-
-    def __str__(self):
-        return "BC Signal: {}".format(self.document.slug)
-
-    class Meta:
-        verbose_name = "BC Signal"


Test patch: