You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
887 B

# Generated by Django 2.2.13 on 2020-06-24 22:57
# V současné době nepoužíván
from django.db import migrations, models
def smaz_prezdivku(apps, schema_editor):
Osoba = apps.get_model('seminar', 'Osoba')
for o in Osoba.objects.filter(prezdivka=''):
o.prezdivka = None
o.save()
def pridej_prezdivku(apps, schema_editor):
Osoba = apps.get_model('seminar', 'Osoba')
for o in Osoba.objects.filter(prezdivka=None):
o.prezdivka = ''
o.save()
class Migration(migrations.Migration):
dependencies = [
('seminar', '0084_clanek_cislo'),
]
operations = [
migrations.AlterField(
model_name='osoba',
name='prezdivka',
field=models.CharField(blank=True, max_length=256, verbose_name='přezdívka'),
),
migrations.RunPython(smaz_prezdivku, pridej_prezdivku),
]