Allow chunk UIDs to be longer.
This commit is contained in:
parent
625df22989
commit
2b52eec41f
19
django_etebase/migrations/0019_auto_20200626_0748.py
Normal file
19
django_etebase/migrations/0019_auto_20200626_0748.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 3.0.3 on 2020-06-26 07:48
|
||||||
|
|
||||||
|
import django.core.validators
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('django_etebase', '0018_auto_20200624_0748'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='collectionitemchunk',
|
||||||
|
name='uid',
|
||||||
|
field=models.CharField(db_index=True, max_length=60, validators=[django.core.validators.RegexValidator(message='Not a valid UID', regex='^[a-zA-Z0-9\\-_]*$')]),
|
||||||
|
),
|
||||||
|
]
|
@ -89,7 +89,7 @@ def chunk_directory_path(instance, filename):
|
|||||||
|
|
||||||
class CollectionItemChunk(models.Model):
|
class CollectionItemChunk(models.Model):
|
||||||
uid = models.CharField(db_index=True, blank=False, null=False,
|
uid = models.CharField(db_index=True, blank=False, null=False,
|
||||||
max_length=43, validators=[Base64Url256BitlValidator])
|
max_length=60, validators=[UidValidator])
|
||||||
item = models.ForeignKey(CollectionItem, related_name='chunks', on_delete=models.CASCADE)
|
item = models.ForeignKey(CollectionItem, related_name='chunks', on_delete=models.CASCADE)
|
||||||
chunkFile = models.FileField(upload_to=chunk_directory_path, max_length=150, unique=True)
|
chunkFile = models.FileField(upload_to=chunk_directory_path, max_length=150, unique=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user