29 lines
868 B
Python
29 lines
868 B
Python
# Generated by Django 3.2.13 on 2022-06-30 07:43
|
|
|
|
from django.db import migrations
|
|
from basicknowledge.models import LANGUAGE_COMMUNICATION, SOCIETY
|
|
|
|
def create_new_types(apps, schema_editor):
|
|
InstrumentType = apps.get_model('basicknowledge', 'InstrumentType')
|
|
language_communication_types = [
|
|
'Lesen',
|
|
]
|
|
society_types = [
|
|
]
|
|
|
|
for type_name in language_communication_types:
|
|
obj, created = InstrumentType.objects.get_or_create(name=type_name, category=LANGUAGE_COMMUNICATION)
|
|
|
|
for type_name in society_types:
|
|
obj, created = InstrumentType.objects.get_or_create(name=type_name, category=SOCIETY)
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('basicknowledge', '0016_auto_20220518_1504'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(create_new_types, migrations.RunPython.noop)
|
|
]
|