Increase listsubscriber username field length
authorCélestin Matte <[email protected]>
Mon, 22 Sep 2025 19:00:50 +0000 (21:00 +0200)
committerMagnus Hagander <[email protected]>
Mon, 1 Dec 2025 19:55:05 +0000 (20:55 +0100)
This field is populated by pglister_sync, copying information from
auth_user.username, which can be up to 150 characters.

django/archives/mailarchives/migrations/0005_alter_listsubscriber_username.py [new file with mode: 0644]
django/archives/mailarchives/models.py

diff --git a/django/archives/mailarchives/migrations/0005_alter_listsubscriber_username.py b/django/archives/mailarchives/migrations/0005_alter_listsubscriber_username.py
new file mode 100644 (file)
index 0000000..61f1d08
--- /dev/null
@@ -0,0 +1,18 @@
+# Generated by Django 5.2.6 on 2025-09-22 18:39
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ("mailarchives", "0004_resend_rate_limit"),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name="listsubscriber",
+            name="username",
+            field=models.CharField(max_length=150),
+        ),
+    ]
index 4a6a055db0ed106b7011a673eee4dca2ea4135c5..d797f81123115ac073208b6fef3155543d241d0d 100644 (file)
@@ -126,7 +126,7 @@ class ListSubscriber(models.Model):
     # We set the username of the community account instead of a
     # foreign key, because the user might not exist.
     list = models.ForeignKey(List, null=False, blank=False, on_delete=models.CASCADE)
-    username = models.CharField(max_length=30, null=False, blank=False)
+    username = models.CharField(max_length=150, null=False, blank=False)
 
     class Meta:
         unique_together = (('list', 'username'), )