# Generated by Django 3.1.7 on 2021-03-21 14:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('auth_name', models.CharField(max_length=100)),
                ('auth_last_name', models.CharField(max_length=150)),
                ('nick_name', models.CharField(max_length=100)),
                ('register_date', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['published', 'register_date', 'nick_name'],
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title_name', models.CharField(max_length=100)),
                ('text_field', models.TextField(max_length=50000)),
                ('post_date', models.DateTimeField(auto_now_add=True)),
                ('author_nick', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='blog.author')),
            ],
        ),
        migrations.AddField(
            model_name='author',
            name='published',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='blog.post'),
        ),
    ]
