mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Allow for MariaDB/MySQL
MariaDB/MySQL doesn't handle indexes on TextFields well and for some reason, Django's migrations opts to blow up rather than handle this in a more user-friendly way. The fix here isn't ideal, but should be sufficient should anyone try to use Paperless with MySQL.
This commit is contained in:
parent
01da48693e
commit
3a427c9130
@ -3,6 +3,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
@ -19,7 +20,7 @@ class Migration(migrations.Migration):
|
|||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('sender', models.CharField(blank=True, db_index=True, max_length=128)),
|
('sender', models.CharField(blank=True, db_index=True, max_length=128)),
|
||||||
('title', models.CharField(blank=True, db_index=True, max_length=128)),
|
('title', models.CharField(blank=True, db_index=True, max_length=128)),
|
||||||
('content', models.TextField(db_index=True)),
|
('content', models.TextField(db_index=("mysql" not in settings.DATABASES["default"]["ENGINE"]))),
|
||||||
('created', models.DateTimeField(auto_now_add=True)),
|
('created', models.DateTimeField(auto_now_add=True)),
|
||||||
('modified', models.DateTimeField(auto_now=True)),
|
('modified', models.DateTimeField(auto_now=True)),
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user