# Generated by Django 2.1.7 on 2019-04-23 22:03

from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('procat2', '0002_site_changes'),
    ]

    operations = [
        migrations.CreateModel(
            name='Catalog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=300)),
                ('public', models.BooleanField(default=False)),
                ('pages', models.PositiveIntegerField(default=0)),
                ('sections', models.PositiveIntegerField(default=0)),
                ('materials', models.PositiveIntegerField(default=0)),
                ('data', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('ordering', models.PositiveIntegerField(default=1000, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Season',
            fields=[
                ('id', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('ordering', models.PositiveIntegerField(default=1000, unique=True)),
            ],
        ),
        migrations.AddField(
            model_name='catalog',
            name='region',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='procat2.Region'),
        ),
        migrations.AddField(
            model_name='catalog',
            name='season',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='procat2.Season'),
        ),
    ]
