# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-06-10 16:04
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='BlogArticles',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='博客标题')),
                ('content', models.TextField()),
                ('pub_date', models.DateTimeField(auto_now=True, verbose_name='发布时间')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='博客作者')),
            ],
            options={
                'verbose_name': '博客',
                'ordering': ('-pub_date',),
                'verbose_name_plural': '博客',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='博客分类')),
            ],
            options={
                'verbose_name_plural': '博客分类',
                'verbose_name': '博客分类',
            },
        ),
        migrations.AddField(
            model_name='blogarticles',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Category', verbose_name='博客分类'),
        ),
    ]
