feat(models): increase max_length for source and file_type fields
Increase max_length for source and file_type fields in IngestJob model from 50 to 100. This prevents data truncation for longer source references or file type strings.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("library", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="ingestjob",
|
||||
name="source",
|
||||
field=models.CharField(default="", max_length=100),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="ingestjob",
|
||||
name="file_type",
|
||||
field=models.CharField(blank=True, max_length=100),
|
||||
),
|
||||
]
|
||||
@@ -339,13 +339,13 @@ class IngestJob(models.Model):
|
||||
|
||||
# Where the file came from. For Daedalus: source="daedalus",
|
||||
# source_ref="<workspace_id>/<file_id>".
|
||||
source = models.CharField(max_length=50, default="")
|
||||
source = models.CharField(max_length=100, default="")
|
||||
source_ref = models.CharField(max_length=200, blank=True, db_index=True)
|
||||
s3_key = models.CharField(max_length=500)
|
||||
|
||||
# Optional metadata carried forward to the Item node.
|
||||
title = models.CharField(max_length=500, blank=True)
|
||||
file_type = models.CharField(max_length=50, blank=True)
|
||||
file_type = models.CharField(max_length=100, blank=True)
|
||||
file_size = models.PositiveBigIntegerField(default=0)
|
||||
collection_uid = models.CharField(max_length=64, blank=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user