# Generated by Django 2.0.5 on 2018-05-27 12:01

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import news.models


class Migration(migrations.Migration):

    dependencies = [
        ('news', '0002_auto_20180527_1007'),
    ]

    operations = [
        migrations.CreateModel(
            name='Catagory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='Record created date', verbose_name='Created date')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='Record last updated date', verbose_name='Modified date')),
                ('title', models.CharField(max_length=60)),
                ('slug', models.SlugField()),
            ],
            options={
                'ordering': ['title', '-updated_at'],
                'verbose_name': 'News Catagory',
                'verbose_name_plural': 'News Catagories',
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='Record created date', verbose_name='Created date')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='Record last updated date', verbose_name='Modified date')),
                ('title', models.CharField(max_length=60)),
                ('slug', models.SlugField()),
                ('body', models.TextField(blank=True)),
                ('status', models.PositiveSmallIntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=0)),
                ('is_featured', models.BooleanField(default=False)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='posts', to=settings.AUTH_USER_MODEL)),
                ('catagory', models.ForeignKey(on_delete=models.SET(news.models.handle_deleted_catagory), related_name='posts', to='news.Catagory')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='Record created date', verbose_name='Created date')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='Record last updated date', verbose_name='Modified date')),
                ('title', models.CharField(max_length=60)),
                ('slug', models.SlugField()),
            ],
            options={
                'ordering': ['title', '-updated_at'],
            },
        ),
        migrations.RemoveField(
            model_name='competition',
            name='league',
        ),
        migrations.RemoveField(
            model_name='team',
            name='league',
        ),
        migrations.RemoveField(
            model_name='team',
            name='players',
        ),
        migrations.DeleteModel(
            name='Competition',
        ),
        migrations.DeleteModel(
            name='League',
        ),
        migrations.DeleteModel(
            name='Player',
        ),
        migrations.DeleteModel(
            name='Team',
        ),
        migrations.AddField(
            model_name='post',
            name='tags',
            field=models.ManyToManyField(blank=True, null=True, related_name='posts', to='news.Tag'),
        ),
    ]
