etesync-server/django_etesync/migrations/0006_auto_20200220_1137.py
2020-02-20 13:56:16 +02:00

50 lines
1.7 KiB
Python

# Generated by Django 3.0.3 on 2020-02-20 11:37
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('django_etesync', '0005_auto_20200220_1123'),
]
operations = [
migrations.RemoveField(
model_name='collectionitem',
name='chunks',
),
migrations.RemoveField(
model_name='collectionitem',
name='current',
),
migrations.RemoveField(
model_name='collectionitem',
name='encryptionKey',
),
migrations.RemoveField(
model_name='collectionitem',
name='hmac',
),
migrations.RemoveField(
model_name='collectionitem',
name='version',
),
migrations.CreateModel(
name='CollectionItemSnapshot',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('version', models.PositiveSmallIntegerField()),
('encryptionKey', models.BinaryField(editable=True)),
('hmac', models.CharField(max_length=50)),
('current', models.BooleanField(db_index=True, default=True)),
('chunks', models.ManyToManyField(related_name='items', to='django_etesync.CollectionItemChunk')),
('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='snapshots', to='django_etesync.CollectionItem')),
],
options={
'unique_together': {('item', 'current')},
},
),
]