Add index for (source, path) to DataFile
This commit is contained in:
@@ -59,4 +59,8 @@ class Migration(migrations.Migration):
|
||||
model_name='datafile',
|
||||
constraint=models.UniqueConstraint(fields=('source', 'path'), name='core_datafile_unique_source_path'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='datafile',
|
||||
index=models.Index(fields=['source', 'path'], name='core_datafile_source_path'),
|
||||
),
|
||||
]
|
||||
|
@@ -273,6 +273,9 @@ class DataFile(models.Model):
|
||||
name='%(app_label)s_%(class)s_unique_source_path'
|
||||
),
|
||||
)
|
||||
indexes = [
|
||||
models.Index(fields=('source', 'path'), name='core_datafile_source_path'),
|
||||
]
|
||||
|
||||
def __str__(self):
|
||||
return self.path
|
||||
|
Reference in New Issue
Block a user