<reponame>jdevera/pythoncanarias_web<filename>tickets/migrations/0011_auto_20190804_2139.py
# Generated by Django 2.2.4 on 2019-08-04 20:39

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


class Migration(migrations.Migration):

    dependencies = [
        ('tickets', '0010_auto_20190804_1818'),
    ]

    operations = [
        migrations.CreateModel(
            name='Gift',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('description', models.TextField(blank=True)),
                ('awarded_at', models.DateTimeField(blank=True, null=True)),
                ('awarded_ticket', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gift', to='tickets.Ticket')),
            ],
            options={
                'ordering': ['awarded_at', 'name', 'description'],
            },
        ),
        migrations.AlterModelOptions(
            name='raffle',
            options={'ordering': ['created_at']},
        ),
        migrations.DeleteModel(
            name='Present',
        ),
        migrations.AddField(
            model_name='gift',
            name='raffle',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='gifts', to='tickets.Raffle'),
        ),
    ]

# Generated by Django 2.2.4 on 2019-08-04 20:39

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


class Migration(migrations.Migration):

    dependencies = [
        ('tickets', '0010_auto_20190804_1818'),
    ]

    operations = [
        migrations.CreateModel(
            name='Gift',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('description', models.TextField(blank=True)),
                ('awarded_at', models.DateTimeField(blank=True, null=True)),
                ('awarded_ticket', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gift', to='tickets.Ticket')),
            ],
            options={
                'ordering': ['awarded_at', 'name', 'description'],
            },
        ),
        migrations.AlterModelOptions(
            name='raffle',
            options={'ordering': ['created_at']},
        ),
        migrations.DeleteModel(
            name='Present',
        ),
        migrations.AddField(
            model_name='gift',
            name='raffle',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='gifts', to='tickets.Raffle'),
        ),
    ]
# Generated by Django 2.2.4 on 2019-08-04 20:39