From: Célestin Matte Date: Mon, 22 Sep 2025 19:00:50 +0000 (+0200) Subject: Increase listsubscriber username field length X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=2a0c2c8c49153a0f0aa8b66914feaf4c7ede9151;p=pgarchives.git Increase listsubscriber username field length This field is populated by pglister_sync, copying information from auth_user.username, which can be up to 150 characters. --- 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 index 0000000..61f1d08 --- /dev/null +++ b/django/archives/mailarchives/migrations/0005_alter_listsubscriber_username.py @@ -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), + ), + ] diff --git a/django/archives/mailarchives/models.py b/django/archives/mailarchives/models.py index 4a6a055..d797f81 100644 --- a/django/archives/mailarchives/models.py +++ b/django/archives/mailarchives/models.py @@ -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'), )