Convert document version checksum field from a text field to a char

field to be able to index across all db backends without problem.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-07-05 16:10:05 -04:00
parent 1041ea4e5e
commit 55eedc153e
2 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-07-05 19:42
# Generated by Django 1.10.7 on 2017-07-05 20:08
from __future__ import unicode_literals
from django.db import migrations, models
@@ -15,9 +15,9 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='documentversion',
name='checksum',
field=models.TextField(
blank=True, db_index=True, editable=False, null=True,
verbose_name='Checksum'
field=models.CharField(
blank=True, db_index=True, editable=False, max_length=64,
null=True, verbose_name='Checksum'
),
),
]

View File

@@ -382,8 +382,8 @@ class DocumentVersion(models.Model):
encoding = models.CharField(
blank=True, editable=False, max_length=64, null=True
)
checksum = models.TextField(
blank=True, db_index=True, editable=False, null=True,
checksum = models.CharField(
blank=True, db_index=True, editable=False, max_length=64, null=True,
verbose_name=_('Checksum')
)