From 8ef9e32d5255af65c40240e26b3af869118e3606 Mon Sep 17 00:00:00 2001 From: kpshukla <84149462+kpshukla@users.noreply.github.com> Date: Sat, 25 Jul 2026 19:44:16 -0400 Subject: [PATCH] Fix: increase LocalSettings.key max_length to 50 LND-ReconnectInterval (21 chars) exceeds the previous max_length=20 on LocalSettings.key. SQLite ignores the constraint, but PostgreSQL enforces VARCHAR(20) strictly and raises DataError when saving it. Fixes #460 --- gui/migrations/0040_alter_localsettings_key.py | 16 ++++++++++++++++ gui/models.py | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 gui/migrations/0040_alter_localsettings_key.py diff --git a/gui/migrations/0040_alter_localsettings_key.py b/gui/migrations/0040_alter_localsettings_key.py new file mode 100644 index 0000000..ba088dc --- /dev/null +++ b/gui/migrations/0040_alter_localsettings_key.py @@ -0,0 +1,16 @@ +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gui', '0039_inboundfeelog'), + ] + + operations = [ + migrations.AlterField( + model_name='localsettings', + name='key', + field=models.CharField(default=None, max_length=50, primary_key=True, serialize=False), + ), + ] diff --git a/gui/models.py b/gui/models.py index 296de04..d34a885 100644 --- a/gui/models.py +++ b/gui/models.py @@ -187,7 +187,7 @@ class Rebalancer(models.Model): app_label = 'gui' class LocalSettings(models.Model): - key = models.CharField(primary_key=True, default=None, max_length=20) + key = models.CharField(primary_key=True, default=None, max_length=50) value = models.CharField(default=None, max_length=50) class Meta: app_label = 'gui'