# Generated by Django 2.2.4 on 2019-08-21 08:30

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


class Migration(migrations.Migration):

    dependencies = [
        ('main', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Feature',
            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')),
                ('slug', models.CharField(max_length=255, unique=True)),
            ],
            options={
                'verbose_name': 'Feature',
                'verbose_name_plural': 'Features',
            },
        ),
        migrations.CreateModel(
            name='SiteFeature',
            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')),
                ('published', models.BooleanField(default=False, verbose_name='Published')),
                ('feature', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='main.Feature')),
                ('site_settings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.SiteSettings')),
            ],
            options={
                'verbose_name': 'Site feature',
                'verbose_name_plural': 'Site features',
                'unique_together': {('site_settings', 'feature')},
            },
        ),
        migrations.AddField(
            model_name='feature',
            name='site_settings',
            field=models.ManyToManyField(through='main.SiteFeature', to='main.SiteSettings'),
        ),
    ]
