Skip to content

Commit

Permalink
Reduce size of lock_id field to 191 characters so that indexing will …
Browse files Browse the repository at this point in the history
…work with utf8mb4 character set
  • Loading branch information
jn123456789 authored and arthurio committed May 3, 2023
1 parent 2db1463 commit 7802cc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db_mutex/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Migration(migrations.Migration):
name='DBMutex',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('lock_id', models.CharField(unique=True, max_length=255)),
('lock_id', models.CharField(unique=True, max_length=191)),
('creation_time', models.DateTimeField(auto_now_add=True)),
],
options={
Expand Down
2 changes: 1 addition & 1 deletion db_mutex/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class DBMutex(models.Model):
:type creation_time: datetime
:param creation_time: The creation time of the mutex lock
"""
lock_id = models.CharField(max_length=255, unique=True)
lock_id = models.CharField(max_length=191, unique=True)
creation_time = models.DateTimeField(auto_now_add=True)

class Meta:
Expand Down

0 comments on commit 7802cc9

Please sign in to comment.