From d1df6db8b16d3a544568b344ca70fffaa2e2c994 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 12 Mar 2020 16:02:00 +0200 Subject: [PATCH] Revision: add metadata field. --- .../0026_collectionitemrevision_meta.py | 18 ++++++++++++++++++ django_etesync/models.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 django_etesync/migrations/0026_collectionitemrevision_meta.py diff --git a/django_etesync/migrations/0026_collectionitemrevision_meta.py b/django_etesync/migrations/0026_collectionitemrevision_meta.py new file mode 100644 index 0000000..8056e61 --- /dev/null +++ b/django_etesync/migrations/0026_collectionitemrevision_meta.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.3 on 2020-03-12 14:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_etesync', '0025_auto_20200312_1350'), + ] + + operations = [ + migrations.AddField( + model_name='collectionitemrevision', + name='meta', + field=models.BinaryField(blank=True, editable=True, null=True), + ), + ] diff --git a/django_etesync/models.py b/django_etesync/models.py index 8079c28..02a173c 100644 --- a/django_etesync/models.py +++ b/django_etesync/models.py @@ -81,6 +81,7 @@ class CollectionItemRevision(models.Model): uid = models.CharField(db_index=True, unique=True, blank=False, null=False, max_length=44, validators=[UidValidator]) item = models.ForeignKey(CollectionItem, related_name='revisions', on_delete=models.CASCADE) + meta = models.BinaryField(editable=True, blank=True, null=True) chunks = models.ManyToManyField(CollectionItemChunk, related_name='items') hmac = models.CharField(max_length=50, blank=False, null=False) current = models.BooleanField(db_index=True, default=True, null=True)