From 76a13dadb81b2b3764ce7e4dbcd1b18f84590067 Mon Sep 17 00:00:00 2001 From: Daniel Quinn Date: Tue, 20 Feb 2018 11:17:11 +0000 Subject: [PATCH] Add another db_index hack for MySQL --- src/documents/migrations/0016_auto_20170325_1558.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/documents/migrations/0016_auto_20170325_1558.py b/src/documents/migrations/0016_auto_20170325_1558.py index 90005b336..373a3d68f 100644 --- a/src/documents/migrations/0016_auto_20170325_1558.py +++ b/src/documents/migrations/0016_auto_20170325_1558.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals from django.db import migrations, models +from django.conf import settings class Migration(migrations.Migration): @@ -15,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='document', name='content', - field=models.TextField(blank=True, db_index=True, help_text='The raw, text-only data of the document. This field is primarily used for searching.'), + field=models.TextField(blank=True, db_index=("mysql" not in settings.DATABASES["default"]["ENGINE"]), help_text='The raw, text-only data of the document. This field is primarily used for searching.'), ), ]