# Generated by Django 2.1.8 on 2020-05-27 15:38

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_column='title', max_length=255)),
                ('desc', models.CharField(db_column='desc', max_length=255)),
                ('content', models.TextField(db_column='content')),
                ('cover_image', models.ImageField(db_column='cover_image', upload_to='')),
                ('created_on', models.TimeField(auto_now=True, db_column='created_on')),
                ('created_by', models.CharField(db_column='created_by', max_length=255)),
                ('is_deleted', models.BooleanField(db_column='is_deleted', default=False)),
                ('state', models.IntegerField(choices=[(1, '正常'), (2, '尚未激活'), (3, '冻结')], db_column='state', default=1)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_column='name', max_length=30)),
                ('created_on', models.TimeField(auto_now=True, db_column='created_on')),
                ('created_by', models.CharField(db_column='created_by', max_length=255)),
                ('is_deleted', models.BooleanField(db_column='is_deleted', default=False)),
                ('state', models.IntegerField(choices=[(1, '正常'), (2, '尚未激活'), (3, '冻结')], db_column='state', default=1)),
            ],
        ),
        migrations.AddField(
            model_name='article',
            name='tag_id',
            field=models.ForeignKey(db_column='tag_id', on_delete=django.db.models.deletion.CASCADE, to='my_blog.Tag'),
        ),
    ]
