# Generated by Django 3.2 on 2021-04-17 23:15

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


class Migration(migrations.Migration):

    dependencies = [
        ('newsmanagement', '0002_auto_20210417_2253'),
    ]

    operations = [
        migrations.AddField(
            model_name='news',
            name='image',
            field=models.ImageField(height_field=1080, null=True, upload_to='news-images', width_field=1920),
        ),
        migrations.AddField(
            model_name='news',
            name='rating',
            field=models.DecimalField(decimal_places=10, default=0.0, max_digits=12),
        ),
        migrations.AddField(
            model_name='news',
            name='votes',
            field=models.PositiveIntegerField(default=0),
        ),
        migrations.CreateModel(
            name='NewsVote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.GenericIPAddressField()),
                ('time_added', models.DateTimeField(auto_now_add=True, null=True)),
                ('News', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='newsmanagement.news')),
            ],
        ),
    ]

# Generated by Django 3.2 on 2021-04-17 23:15

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


class Migration(migrations.Migration):

    dependencies = [
        ('newsmanagement', '0002_auto_20210417_2253'),
    ]

    operations = [
        migrations.AddField(
            model_name='news',
            name='image',
            field=models.ImageField(height_field=1080, null=True, upload_to='news-images', width_field=1920),
        ),
        migrations.AddField(
            model_name='news',
            name='rating',
            field=models.DecimalField(decimal_places=10, default=0.0, max_digits=12),
        ),
        migrations.AddField(
            model_name='news',
            name='votes',
            field=models.PositiveIntegerField(default=0),
        ),
        migrations.CreateModel(
            name='NewsVote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.GenericIPAddressField()),
                ('time_added', models.DateTimeField(auto_now_add=True, null=True)),
                ('News', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='newsmanagement.news')),
            ],
        ),
    ]

# Generated by Django 3.2 on 2021-04-17 23:15