mirror of
https://github.com/etesync/server
synced 2024-11-18 23:08:08 +00:00
24 lines
579 B
Python
24 lines
579 B
Python
|
# 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_etesync', 'Stoken')
|
||
|
CollectionMember = apps.get_model('django_etesync', 'CollectionMember')
|
||
|
|
||
|
for member in CollectionMember.objects.all():
|
||
|
member.stoken = Stoken.objects.create()
|
||
|
member.save()
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('django_etesync', '0011_collectionmember_stoken'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.RunPython(create_stokens),
|
||
|
]
|