# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('themes', '0015_change_default_theme_main_color'),
    ]

    operations = [
        migrations.AlterField(
            model_name='theme',
            name='reveal_logo',
            field=models.ImageField(default='default/reveal_logo.png', blank=True, null=True, help_text='Choose a logo which be used in reveal. ', verbose_name='reveal logo', upload_to='theme')
        ),
        migrations.RunSQL(
            "UPDATE themes_theme SET reveal_logo='default/reveal_logo.png' WHERE reveal_logo = ''",
            # If we backward we can't set `reveal_logo=NULL` as there is a `not-null constraint`
            # in previous schema
            "UPDATE themes_theme SET reveal_logo='' WHERE reveal_logo = 'default/reveal_logo.png'"
        )
    ]
