# Generated by Django 3.0.5 on 2020-04-22 02:20

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("submission", "0046_question_submission_types"),
    ]

    operations = [
        migrations.CreateModel(
            name="PublicVote",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True, primary_key=True, serialize=False
                    ),
                ),
                ("score", models.IntegerField()),
                ("email_hash", models.CharField(max_length=32)),
                ("timestamp", models.DateTimeField(auto_now=True)),
                (
                    "submission",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="public_votes",
                        to="submission.Submission",
                    ),
                ),
            ],
            options={
                "unique_together": {("submission", "email_hash")},
            },
        ),
    ]
