# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-08-05 09:26
from __future__ import unicode_literals

from django.conf import settings
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),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('published_time', models.DateTimeField()),
                ('body', models.TextField()),
            ],
            options={
                'ordering': ('-published_time',),
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('heading', models.CharField(max_length=100)),
                ('slug', models.CharField(max_length=100)),
                ('department', models.CharField(choices=[('Art', 'Art'), ('Sport', 'Sport'), ('Science', 'Science'), ('Politics', 'Politics'), ('Category1', 'Category1')], default=('Art', 'Art'), max_length=15)),
                ('published_time', models.DateTimeField()),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-published_time',),
                'get_latest_by': 'published_time',
            },
        ),
        migrations.CreateModel(
            name='Paragraph',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('paragraph', models.TextField(max_length=20000)),
                ('image', models.ImageField(upload_to='images/')),
                ('image_description', models.CharField(max_length=200)),
                ('news_paragraph', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='news.News')),
            ],
            options={
                'db_table': 'paragraphs',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag', models.CharField(default='', max_length=120)),
                ('news_tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='news.News')),
            ],
            options={
                'db_table': 'tags',
            },
        ),
        migrations.AddField(
            model_name='comment',
            name='comments_news',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='news.News'),
        ),
        migrations.AddField(
            model_name='comment',
            name='comments_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
