diff --git a/django_etebase/migrations/0020_remove_collectionitemrevision_salt.py b/django_etebase/migrations/0020_remove_collectionitemrevision_salt.py new file mode 100644 index 0000000..2df32bf --- /dev/null +++ b/django_etebase/migrations/0020_remove_collectionitemrevision_salt.py @@ -0,0 +1,17 @@ +# Generated by Django 3.0.3 on 2020-06-26 08:19 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_etebase', '0019_auto_20200626_0748'), + ] + + operations = [ + migrations.RemoveField( + model_name='collectionitemrevision', + name='salt', + ), + ] diff --git a/django_etebase/models.py b/django_etebase/models.py index 964012a..c8ceaba 100644 --- a/django_etebase/models.py +++ b/django_etebase/models.py @@ -110,7 +110,6 @@ class CollectionItemRevision(models.Model): stoken = models.OneToOneField(Stoken, on_delete=models.PROTECT) uid = models.CharField(db_index=True, unique=True, blank=False, null=False, max_length=43, validators=[Base64Url256BitlValidator]) - salt = models.BinaryField(editable=True, blank=False, null=False, default=b'') item = models.ForeignKey(CollectionItem, related_name='revisions', on_delete=models.CASCADE) meta = models.BinaryField(editable=True, blank=False, null=False) current = models.BooleanField(db_index=True, default=True, null=True) diff --git a/django_etebase/serializers.py b/django_etebase/serializers.py index a76f388..2fe0a21 100644 --- a/django_etebase/serializers.py +++ b/django_etebase/serializers.py @@ -107,12 +107,11 @@ class CollectionItemRevisionSerializer(serializers.ModelSerializer): queryset=models.RevisionChunkRelation.objects.all(), many=True ) - salt = BinaryBase64Field() meta = BinaryBase64Field() class Meta: model = models.CollectionItemRevision - fields = ('chunks', 'meta', 'uid', 'salt', 'deleted') + fields = ('chunks', 'meta', 'uid', 'deleted') class CollectionItemSerializer(serializers.ModelSerializer):