1
0
mirror of https://github.com/etesync/server synced 2024-11-22 08:48:07 +00:00

Fix DB errors when using MySQL/MariaDB.

Fixes #69.
This commit is contained in:
Tom Hacohen 2021-01-27 14:38:10 +02:00
parent 233aeab98b
commit 0ac41e77e8
2 changed files with 19 additions and 1 deletions

View File

@ -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),
),
]

View File

@ -36,7 +36,7 @@ def stoken_annotation_builder(stoken_id_fields: t.List[str]):
class CollectionType(models.Model):
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"]