Index the document checksum field for faster searches by checksum.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -53,6 +53,7 @@ Other Changes
|
||||
document types from either the metadata type list or document type list.
|
||||
GitLab issue #373.
|
||||
- Add support to search documents by their checksums.
|
||||
- The document checksum field is now indexed for faster searches by checksum.
|
||||
|
||||
Removals
|
||||
--------
|
||||
|
||||
23
mayan/apps/documents/migrations/0038_auto_20170705_1942.py
Normal file
23
mayan/apps/documents/migrations/0038_auto_20170705_1942.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2017-07-05 19:42
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('documents', '0037_auto_20161231_0617'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='documentversion',
|
||||
name='checksum',
|
||||
field=models.TextField(
|
||||
blank=True, db_index=True, editable=False, null=True,
|
||||
verbose_name='Checksum'
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -383,7 +383,8 @@ class DocumentVersion(models.Model):
|
||||
blank=True, editable=False, max_length=64, null=True
|
||||
)
|
||||
checksum = models.TextField(
|
||||
blank=True, editable=False, null=True, verbose_name=_('Checksum')
|
||||
blank=True, db_index=True, editable=False, null=True,
|
||||
verbose_name=_('Checksum')
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
Reference in New Issue
Block a user