# Generated by Django 2.2.7 on 2019-11-27 10:47

import django.contrib.postgres.fields.jsonb
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('main', '0039_sitefeature_old_id'),
        ('collection', '0017_collection_old_id'),
    ]

    operations = [
        migrations.CreateModel(
            name='GuideType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(default=django.utils.timezone.now, editable=False, verbose_name='Date created')),
                ('modified', models.DateTimeField(auto_now=True, verbose_name='Date updated')),
                ('name', models.SlugField(max_length=255, unique=True, verbose_name='code')),
            ],
            options={
                'verbose_name': 'guide type',
                'verbose_name_plural': 'guide types',
            },
        ),
        migrations.RemoveField(
            model_name='guide',
            name='advertorials',
        ),
        migrations.RemoveField(
            model_name='guide',
            name='collection',
        ),
        migrations.RemoveField(
            model_name='guide',
            name='parent',
        ),
        migrations.AddField(
            model_name='guide',
            name='old_id',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='guide',
            name='site',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='main.SiteSettings', verbose_name='site settings'),
        ),
        migrations.AddField(
            model_name='guide',
            name='slug',
            field=models.SlugField(max_length=255, null=True, unique=True, verbose_name='slug'),
        ),
        migrations.AddField(
            model_name='guide',
            name='state',
            field=models.PositiveSmallIntegerField(choices=[(0, 'built'), (1, 'waiting'), (2, 'removing'), (3, 'building')], default=1, verbose_name='state'),
        ),
        migrations.AddField(
            model_name='guide',
            name='vintage',
            field=models.IntegerField(null=True, validators=[django.core.validators.MinValueValidator(1900), django.core.validators.MaxValueValidator(2100)], verbose_name='guide vintage year'),
        ),
        migrations.AddField(
            model_name='guide',
            name='guide_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='collection.GuideType', verbose_name='type'),
        ),
        migrations.AlterField(
            model_name='guide',
            name='start',
            field=models.DateTimeField(null=True, verbose_name='start'),
        ),
    ]
