text: # Generated by Django 2.0.1 on 2020-03-04 06:58
  
  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='Comment',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('content', models.TextField()),
                  ('pub_time', models.DateTimeField(auto_now_add=True)),
                  ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'ordering': ['-pub_time'],
              },
          ),
          migrations.CreateModel(
              name='News',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('title', models.CharField(max_length=200)),
                  ('desc', models.CharField(max_length=200)),
                  ('thumbnail', models.URLField()),
                  ('content', models.TextField()),
                  ('pub_time', models.DateTimeField(auto_now_add=True)),
                  ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'ordering': ['-pub_time'],
              },
          ),
          migrations.CreateModel(
              name='NewsCategory',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=100)),
              ],
          ),
          migrations.AddField(
              model_name='news',
              name='category',
              field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='news.NewsCategory'),
          ),
          migrations.AddField(
              model_name='comment',
              name='news',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='news.News'),
          ),
      ]
  