# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2019-05-23 07:25
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('cno', models.AutoField(primary_key=True, serialize=False)),
                ('cname', models.CharField(max_length=30, unique=True)),
            ],
            options={
                'db_table': 't_category',
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('pno', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=100)),
                ('des', models.TextField()),
                ('content', models.TextField()),
                ('publish_time', models.DateTimeField(auto_now_add=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Category')),
            ],
            options={
                'db_table': 't_post',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('tno', models.AutoField(primary_key=True, serialize=False)),
                ('tname', models.CharField(max_length=30, unique=True)),
            ],
            options={
                'db_table': 't_tag',
            },
        ),
        migrations.AddField(
            model_name='post',
            name='tag',
            field=models.ManyToManyField(to='blog.Tag'),
        ),
    ]
