From abd2ffaed0ecd2a3ec40b255c822d5c9da9dd286 Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Mon, 12 Oct 2026 14:17:58 +0200
Subject: [PATCH v12] Extend badge title to 64 chars

Daniel pointed out that a reasonable badge title like "Nordic PGDay 2026
Program Committee" is already longer than the 32 chars (it's 35) we
catered for. Extend it to 64 to match the max slug length.
---
 .../migrations/0006_alter_badge_badge.py      | 25 +++++++++++++++++++
 pgweb/contributors/models.py                  |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 pgweb/contributors/migrations/0006_alter_badge_badge.py

diff --git a/pgweb/contributors/migrations/0006_alter_badge_badge.py b/pgweb/contributors/migrations/0006_alter_badge_badge.py
new file mode 100644
index 00000000..3f709417
--- /dev/null
+++ b/pgweb/contributors/migrations/0006_alter_badge_badge.py
@@ -0,0 +1,25 @@
+# Generated by Django 5.2.17 on 2026-10-12 12:17
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        (
+            "contributors",
+            "0005_alter_contributor_ctype_alter_contributor_email_and_more",
+        ),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name="badge",
+            name="badge",
+            field=models.CharField(
+                help_text='Title of this badge, e.g. "PGConf.EU 2025 Speaker".',
+                max_length=64,
+                unique=True,
+            ),
+        ),
+    ]
diff --git a/pgweb/contributors/models.py b/pgweb/contributors/models.py
index 7ffc0881..58616da4 100644
--- a/pgweb/contributors/models.py
+++ b/pgweb/contributors/models.py
@@ -98,7 +98,7 @@ class BadgeManager(models.Manager):
 
 class Badge(TwostateModerateModel):
     org = models.ForeignKey(Organisation, null=False, blank=False, verbose_name="Organisation", help_text=ORGANISATION_HINT_TEXT, on_delete=models.CASCADE)
-    badge = models.CharField(max_length=32, null=False, blank=False, unique=True, help_text='Title of this badge, e.g. "PGConf.EU 2025 Speaker".')
+    badge = models.CharField(max_length=64, null=False, blank=False, unique=True, help_text='Title of this badge, e.g. "PGConf.EU 2025 Speaker".')
     slug = models.SlugField(max_length=64, null=False, blank=False, unique=True, help_text='URL-friendly identifier for the badge page. Generated from the title when the badge is created, and kept fixed after that.')
     description = models.TextField(null=True, blank=True, help_text='What did the people do who contributed here?')
     url = models.URLField(max_length=100, null=True, blank=True, verbose_name='Contribution URL', help_text='URL for this contribution, e.g. the conference homepage. (Leave blank when there is no URL.)')
-- 
2.53.0

