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.
|
document types from either the metadata type list or document type list.
|
||||||
GitLab issue #373.
|
GitLab issue #373.
|
||||||
- Add support to search documents by their checksums.
|
- Add support to search documents by their checksums.
|
||||||
|
- The document checksum field is now indexed for faster searches by checksum.
|
||||||
|
|
||||||
Removals
|
Removals
|
||||||
--------
|
--------
|
||||||
|
|||||||
@@ -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
|
blank=True, editable=False, max_length=64, null=True
|
||||||
)
|
)
|
||||||
checksum = models.TextField(
|
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):
|
def __str__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user