Skip to content

Commit fcb0a2f

Browse files
committed
feat: widen token column a bit
The 128 character limit implied a character limit of about 90 for file names. This is a bit too close to the practical limit of what users *actually* do, and if the limit is hit, LOCK calls fail with unexpected errors due to the DB not being able to deal with the token. Widening it to 255 chars should move the "hard limit" further away, thus reducing the chance of errors significantly.
1 parent 7095a01 commit fcb0a2f

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Django 4.2.13 on 2024-11-21 17:32
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("manabi_migrations", "0001_initial"),
9+
]
10+
11+
operations = [
12+
migrations.AlterField(
13+
model_name="lock",
14+
name="token",
15+
field=models.CharField(max_length=255, primary_key=True, serialize=False),
16+
),
17+
]

manabi_django/manabi_migrations/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
class Lock(models.Model):
5-
token = models.CharField(max_length=128, primary_key=True)
5+
token = models.CharField(max_length=255, primary_key=True)
66
data = models.JSONField()
77

88
class Meta:

0 commit comments

Comments
 (0)