# Generated by Django 2.0 on 2018-11-06 17:19

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


class Migration(migrations.Migration):

    dependencies = [
        ('blogs', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Upvote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fingerprint', models.CharField(max_length=128)),
                ('is_upvoted', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ('-created_at',),
            },
        ),
        migrations.AlterField(
            model_name='post',
            name='author',
            field=models.CharField(max_length=256),
        ),
        migrations.AddField(
            model_name='upvote',
            name='post',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blogs.Post'),
        ),
        migrations.AlterUniqueTogether(
            name='upvote',
            unique_together={('post', 'fingerprint')},
        ),
    ]
