You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
579 B
Python
24 lines
579 B
Python
5 years ago
|
# Generated by Django 3.0.3 on 2020-05-27 07:43
|
||
|
|
||
|
from django.db import migrations
|
||
|
|
||
|
|
||
|
def create_stokens(apps, schema_editor):
|
||
5 years ago
|
Stoken = apps.get_model('django_etebase', 'Stoken')
|
||
|
CollectionMember = apps.get_model('django_etebase', 'CollectionMember')
|
||
5 years ago
|
|
||
|
for member in CollectionMember.objects.all():
|
||
|
member.stoken = Stoken.objects.create()
|
||
|
member.save()
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
5 years ago
|
('django_etebase', '0011_collectionmember_stoken'),
|
||
5 years ago
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.RunPython(create_stokens),
|
||
|
]
|