Rename django_etesync to django_etebase.
This commit is contained in:
91
django_etebase/migrations/0001_initial.py
Normal file
91
django_etebase/migrations/0001_initial.py
Normal file
@@ -0,0 +1,91 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-13 13:01
|
||||
|
||||
from django.conf import settings
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django_etebase.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Collection',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uid', models.CharField(db_index=True, max_length=44, validators=[django.core.validators.RegexValidator(message='Not a valid UID', regex='[a-zA-Z0-9]')])),
|
||||
('version', models.PositiveSmallIntegerField()),
|
||||
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('uid', 'owner')},
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CollectionItem',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uid', models.CharField(db_index=True, max_length=44, null=True, validators=[django.core.validators.RegexValidator(message='Not a valid UID', regex='[a-zA-Z0-9]')])),
|
||||
('version', models.PositiveSmallIntegerField()),
|
||||
('encryptionKey', models.BinaryField(editable=True, null=True)),
|
||||
('collection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='django_etebase.Collection')),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('uid', 'collection')},
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CollectionItemChunk',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uid', models.CharField(db_index=True, max_length=44, validators=[django.core.validators.RegexValidator(message='Expected a 256bit base64url.', regex='^[a-zA-Z0-9\\-_]{43}$')])),
|
||||
('chunkFile', models.FileField(max_length=150, unique=True, upload_to=django_etebase.models.chunk_directory_path)),
|
||||
('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chunks', to='django_etebase.CollectionItem')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CollectionItemRevision',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uid', models.CharField(db_index=True, max_length=44, unique=True, validators=[django.core.validators.RegexValidator(message='Expected a 256bit base64url.', regex='^[a-zA-Z0-9\\-_]{43}$')])),
|
||||
('meta', models.BinaryField(editable=True)),
|
||||
('current', models.BooleanField(db_index=True, default=True, null=True)),
|
||||
('deleted', models.BooleanField(default=False)),
|
||||
('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='revisions', to='django_etebase.CollectionItem')),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('item', 'current')},
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='RevisionChunkRelation',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('chunk', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='revisions_relation', to='django_etebase.CollectionItemChunk')),
|
||||
('revision', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chunks_relation', to='django_etebase.CollectionItemRevision')),
|
||||
],
|
||||
options={
|
||||
'ordering': ('id',),
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CollectionMember',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('encryptionKey', models.BinaryField(editable=True)),
|
||||
('accessLevel', models.CharField(choices=[('adm', 'Admin'), ('rw', 'Read Write'), ('ro', 'Read Only')], default='ro', max_length=3)),
|
||||
('collection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='members', to='django_etebase.Collection')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('user', 'collection')},
|
||||
},
|
||||
),
|
||||
]
|
||||
25
django_etebase/migrations/0002_userinfo.py
Normal file
25
django_etebase/migrations/0002_userinfo.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-14 09:51
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('myauth', '0001_initial'),
|
||||
('django_etebase', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='UserInfo',
|
||||
fields=[
|
||||
('owner', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
|
||||
('version', models.PositiveSmallIntegerField(default=1)),
|
||||
('pubkey', models.BinaryField(editable=True)),
|
||||
('salt', models.BinaryField(editable=True)),
|
||||
],
|
||||
),
|
||||
]
|
||||
31
django_etebase/migrations/0003_collectioninvitation.py
Normal file
31
django_etebase/migrations/0003_collectioninvitation.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-20 11:03
|
||||
|
||||
from django.conf import settings
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('django_etebase', '0002_userinfo'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CollectionInvitation',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uid', models.CharField(db_index=True, max_length=44, validators=[django.core.validators.RegexValidator(message='Expected a 256bit base64url.', regex='^[a-zA-Z0-9\\-_]{43}$')])),
|
||||
('signedEncryptionKey', models.BinaryField()),
|
||||
('accessLevel', models.CharField(choices=[('adm', 'Admin'), ('rw', 'Read Write'), ('ro', 'Read Only')], default='ro', max_length=3)),
|
||||
('fromMember', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_etebase.CollectionMember')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='incoming_invitations', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('user', 'fromMember')},
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-21 14:45
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0003_collectioninvitation'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='collectioninvitation',
|
||||
name='version',
|
||||
field=models.PositiveSmallIntegerField(default=1),
|
||||
),
|
||||
]
|
||||
18
django_etebase/migrations/0005_auto_20200526_1021.py
Normal file
18
django_etebase/migrations/0005_auto_20200526_1021.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-26 10:21
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0004_collectioninvitation_version'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='userinfo',
|
||||
old_name='pubkey',
|
||||
new_name='loginPubkey',
|
||||
),
|
||||
]
|
||||
25
django_etebase/migrations/0006_auto_20200526_1040.py
Normal file
25
django_etebase/migrations/0006_auto_20200526_1040.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-26 10:40
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0005_auto_20200526_1021'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='userinfo',
|
||||
name='encryptedSeckey',
|
||||
field=models.BinaryField(default=b'', editable=True),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='userinfo',
|
||||
name='pubkey',
|
||||
field=models.BinaryField(default=b'', editable=True),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
39
django_etebase/migrations/0007_auto_20200526_1336.py
Normal file
39
django_etebase/migrations/0007_auto_20200526_1336.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-26 13:36
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0006_auto_20200526_1040'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='collection',
|
||||
name='uid',
|
||||
field=models.CharField(db_index=True, max_length=43, validators=[django.core.validators.RegexValidator(message='Not a valid UID', regex='^[a-zA-Z0-9]*$')]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='collectioninvitation',
|
||||
name='uid',
|
||||
field=models.CharField(db_index=True, max_length=43, validators=[django.core.validators.RegexValidator(message='Expected a base64url.', regex='^[a-zA-Z0-9\\-_]{42,43}$')]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='collectionitem',
|
||||
name='uid',
|
||||
field=models.CharField(db_index=True, max_length=43, null=True, validators=[django.core.validators.RegexValidator(message='Not a valid UID', regex='^[a-zA-Z0-9]*$')]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='collectionitemchunk',
|
||||
name='uid',
|
||||
field=models.CharField(db_index=True, max_length=43, validators=[django.core.validators.RegexValidator(message='Expected a base64url.', regex='^[a-zA-Z0-9\\-_]{42,43}$')]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='collectionitemrevision',
|
||||
name='uid',
|
||||
field=models.CharField(db_index=True, max_length=43, unique=True, validators=[django.core.validators.RegexValidator(message='Expected a base64url.', regex='^[a-zA-Z0-9\\-_]{42,43}$')]),
|
||||
),
|
||||
]
|
||||
28
django_etebase/migrations/0008_auto_20200526_1535.py
Normal file
28
django_etebase/migrations/0008_auto_20200526_1535.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-26 15:35
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django_etebase.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0007_auto_20200526_1336'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Stoken',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uid', models.CharField(db_index=True, default=django_etebase.models.generate_stoken_uid, max_length=43, unique=True, validators=[django.core.validators.RegexValidator(message='Expected a base64url.', regex='^[a-zA-Z0-9\\-_]{42,43}$')])),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='collectionitemrevision',
|
||||
name='stoken',
|
||||
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.PROTECT, to='django_etebase.Stoken'),
|
||||
),
|
||||
]
|
||||
23
django_etebase/migrations/0009_auto_20200526_1535.py
Normal file
23
django_etebase/migrations/0009_auto_20200526_1535.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-26 15:35
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def create_stokens(apps, schema_editor):
|
||||
Stoken = apps.get_model('django_etebase', 'Stoken')
|
||||
CollectionItemRevision = apps.get_model('django_etebase', 'CollectionItemRevision')
|
||||
|
||||
for rev in CollectionItemRevision.objects.all():
|
||||
rev.stoken = Stoken.objects.create()
|
||||
rev.save()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0008_auto_20200526_1535'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(create_stokens),
|
||||
]
|
||||
19
django_etebase/migrations/0010_auto_20200526_1539.py
Normal file
19
django_etebase/migrations/0010_auto_20200526_1539.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-26 15:39
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0009_auto_20200526_1535'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='collectionitemrevision',
|
||||
name='stoken',
|
||||
field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='django_etebase.Stoken'),
|
||||
),
|
||||
]
|
||||
19
django_etebase/migrations/0011_collectionmember_stoken.py
Normal file
19
django_etebase/migrations/0011_collectionmember_stoken.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-27 07:43
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0010_auto_20200526_1539'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='collectionmember',
|
||||
name='stoken',
|
||||
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.PROTECT, to='django_etebase.Stoken'),
|
||||
),
|
||||
]
|
||||
23
django_etebase/migrations/0012_auto_20200527_0743.py
Normal file
23
django_etebase/migrations/0012_auto_20200527_0743.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-27 07:43
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def create_stokens(apps, schema_editor):
|
||||
Stoken = apps.get_model('django_etebase', 'Stoken')
|
||||
CollectionMember = apps.get_model('django_etebase', 'CollectionMember')
|
||||
|
||||
for member in CollectionMember.objects.all():
|
||||
member.stoken = Stoken.objects.create()
|
||||
member.save()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0011_collectionmember_stoken'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(create_stokens),
|
||||
]
|
||||
28
django_etebase/migrations/0013_collectionmemberremoved.py
Normal file
28
django_etebase/migrations/0013_collectionmemberremoved.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 3.0.3 on 2020-05-27 11:29
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('django_etebase', '0012_auto_20200527_0743'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CollectionMemberRemoved',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('collection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='removed_members', to='django_etebase.Collection')),
|
||||
('stoken', models.OneToOneField(null=True, on_delete=django.db.models.deletion.PROTECT, to='django_etebase.Stoken')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('user', 'collection')},
|
||||
},
|
||||
),
|
||||
]
|
||||
18
django_etebase/migrations/0014_auto_20200602_1558.py
Normal file
18
django_etebase/migrations/0014_auto_20200602_1558.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.0.3 on 2020-06-02 15:58
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0013_collectionmemberremoved'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='userinfo',
|
||||
old_name='encryptedSeckey',
|
||||
new_name='encryptedContent',
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.0.3 on 2020-06-04 12:18
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_etebase', '0014_auto_20200602_1558'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='collectionitemrevision',
|
||||
name='salt',
|
||||
field=models.BinaryField(default=b'', editable=True),
|
||||
),
|
||||
]
|
||||
0
django_etebase/migrations/__init__.py
Normal file
0
django_etebase/migrations/__init__.py
Normal file
Reference in New Issue
Block a user