Skip to content

Commit

Permalink
feat: widen token column a bit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
winged committed Nov 22, 2024
1 parent 7095a01 commit fcb0a2f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.13 on 2024-11-21 17:32

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("manabi_migrations", "0001_initial"),
]

operations = [
migrations.AlterField(
model_name="lock",
name="token",
field=models.CharField(max_length=255, primary_key=True, serialize=False),
),
]
2 changes: 1 addition & 1 deletion manabi_django/manabi_migrations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class Lock(models.Model):
token = models.CharField(max_length=128, primary_key=True)
token = models.CharField(max_length=255, primary_key=True)
data = models.JSONField()

class Meta:
Expand Down

0 comments on commit fcb0a2f

Please sign in to comment.