# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-09-02 07:55
from __future__ import unicode_literals

from django.db import migrations, models


def preserve_event_settings(apps, schema_editor):
    Event = apps.get_model('pretixbase', 'Event')
    EventSetting = apps.get_model('pretixbase', 'EventSetting')
    for e in Event.objects.all():
        EventSetting.objects.create(object=e, key='mail_days_order_expire_warning', value='0')


class Migration(migrations.Migration):

    dependencies = [
        ('pretixbase', '0035_merge'),
    ]

    operations = [
        migrations.AddField(
            model_name='order',
            name='expiry_reminder_sent',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='item',
            name='allow_cancel',
            field=models.BooleanField(default=True, help_text='If you deactivate this, an order including this product might not be cancelled by the user. It may still be cancelled by you.', verbose_name='Allow product to be cancelled'),
        ),
        migrations.RunPython(preserve_event_settings)
    ]
