# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-01 16:10
from __future__ import unicode_literals

import django.db.models.deletion
from django.db import migrations, models


def forwards(apps, schema_editor):
    CachedTicket = apps.get_model('pretixbase', 'CachedTicket')
    CachedTicket.objects.all().delete()


class Migration(migrations.Migration):

    dependencies = [
        ('pretixbase', '0043_globalsetting'),
    ]

    operations = [
        migrations.RunPython(
            forwards, migrations.RunPython.noop
        ),
        migrations.RemoveField(
            model_name='cachedticket',
            name='order',
        ),
        migrations.AddField(
            model_name='cachedticket',
            name='order_position',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='pretixbase.OrderPosition'),
            preserve_default=False,
        ),
    ]
