# Generated by Django 4.0.3 on 2022-04-12 13:43 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('posts', '0003_alter_post_options'), ] operations = [ migrations.CreateModel( name='CommentAuthor', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('author_name', models.CharField(max_length=60, verbose_name='Имя автора')), ('author_secret_hash', models.CharField(blank=True, max_length=256, null=True, verbose_name='Хеш секрета')), ], options={ 'unique_together': {('author_name', 'author_secret_hash')}, }, ), migrations.CreateModel( name='Comment', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('comment_text', models.TextField()), ('date', models.DateTimeField(default=django.utils.timezone.now)), ('author', models.ForeignKey(default='аноним', on_delete=django.db.models.deletion.CASCADE, to='comments.commentauthor')), ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.post')), ('reply', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='comments.comment')), ], ), ]