Add missing migrations forgotten in the previous commit
Missing from: 73f4ff765c7713c9aa48dec2bfc4c3c1c0c7e9f3
This commit is contained in:
parent
2a39f3538e
commit
6e7ad92a12
28
django_etesync/migrations/0008_auto_20200526_1535.py
Normal file
28
django_etesync/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_etesync.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('django_etesync', '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_etesync.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_etesync.Stoken'),
|
||||||
|
),
|
||||||
|
]
|
23
django_etesync/migrations/0009_auto_20200526_1535.py
Normal file
23
django_etesync/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_etesync', 'Stoken')
|
||||||
|
CollectionItemRevision = apps.get_model('django_etesync', 'CollectionItemRevision')
|
||||||
|
|
||||||
|
for rev in CollectionItemRevision.objects.all():
|
||||||
|
rev.stoken = Stoken.objects.create()
|
||||||
|
rev.save()
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('django_etesync', '0008_auto_20200526_1535'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(create_stokens),
|
||||||
|
]
|
19
django_etesync/migrations/0010_auto_20200526_1539.py
Normal file
19
django_etesync/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_etesync', '0009_auto_20200526_1535'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='collectionitemrevision',
|
||||||
|
name='stoken',
|
||||||
|
field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='django_etesync.Stoken'),
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user