# Generated by Django 2.0.7 on 2018-07-07 22:33

from django.contrib.postgres.operations import HStoreExtension
import django.contrib.postgres.fields.hstore
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid


class Migration(migrations.Migration):
    initial = True

    dependencies = [
    ]

    operations = [
        HStoreExtension(),
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.CharField(max_length=24)),
                ('confirmation', models.TextField()),
                ('default', models.TextField()),
                ('rejections', django.contrib.postgres.fields.hstore.HStoreField()),
            ],
        ),
        migrations.CreateModel(
            name='Edition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=16)),
                ('start', models.DateTimeField(default=django.utils.timezone.now)),
                ('finish', models.DateTimeField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Quest',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=32)),
                ('description', models.TextField(blank=True)),
                ('question', models.CharField(max_length=100)),
                ('answer',
                 models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='game.Answer')),
                ('edition', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='quests',
                                              related_query_name='quest', to='game.Edition')),
                ('succeeding',
                 models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='previous',
                                   to='game.Quest')),
            ],
        ),
        migrations.CreateModel(
            name='Reward',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField()),
            ],
        ),
        migrations.AddField(
            model_name='edition',
            name='reward',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='game.Reward'),
        ),
    ]
