From 80ef568397bf790fae6f7a77311c23cff184f1a3 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 17 Mar 2020 22:10:33 +0200 Subject: [PATCH] Make meta not-null. --- .../migrations/0033_auto_20200317_2010.py | 19 +++++++++++++++++++ django_etesync/models.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 django_etesync/migrations/0033_auto_20200317_2010.py diff --git a/django_etesync/migrations/0033_auto_20200317_2010.py b/django_etesync/migrations/0033_auto_20200317_2010.py new file mode 100644 index 0000000..7a42b38 --- /dev/null +++ b/django_etesync/migrations/0033_auto_20200317_2010.py @@ -0,0 +1,19 @@ +# Generated by Django 3.0.3 on 2020-03-17 20:10 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_etesync', '0032_auto_20200317_1513'), + ] + + operations = [ + migrations.AlterField( + model_name='collectionitemrevision', + name='meta', + field=models.BinaryField(default=b'', editable=True), + preserve_default=False, + ), + ] diff --git a/django_etesync/models.py b/django_etesync/models.py index 586c105..ca3dea9 100644 --- a/django_etesync/models.py +++ b/django_etesync/models.py @@ -86,7 +86,7 @@ class CollectionItemRevision(models.Model): uid = models.CharField(db_index=True, unique=True, blank=False, null=False, max_length=44, validators=[Base64Url256BitValidator]) item = models.ForeignKey(CollectionItem, related_name='revisions', on_delete=models.CASCADE) - meta = models.BinaryField(editable=True, blank=True, null=True) + meta = models.BinaryField(editable=True, blank=False, null=False) chunks = models.ManyToManyField(CollectionItemChunk, related_name='items') current = models.BooleanField(db_index=True, default=True, null=True) deleted = models.BooleanField(default=False)