Fix DB errors when using MySQL/MariaDB.

Fixes #69.
master
Tom Hacohen 4 years ago
parent 233aeab98b
commit 0ac41e77e8

@ -0,0 +1,18 @@
# Generated by Django 3.1.1 on 2021-01-27 12:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_etebase', '0036_auto_20201214_1128'),
]
operations = [
migrations.AlterField(
model_name='collectiontype',
name='uid',
field=models.BinaryField(db_index=True, editable=True, max_length=1024, unique=True),
),
]

@ -36,7 +36,7 @@ def stoken_annotation_builder(stoken_id_fields: t.List[str]):
class CollectionType(models.Model): class CollectionType(models.Model):
owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
uid = models.BinaryField(editable=True, blank=False, null=False, db_index=True, unique=True) uid = models.BinaryField(editable=True, blank=False, null=False, db_index=True, unique=True, max_length=1024)
objects: models.manager.BaseManager["CollectionType"] objects: models.manager.BaseManager["CollectionType"]

Loading…
Cancel
Save