<reponame>Ogutu-Brian/questioners
# Generated by Django 2.1.7 on 2019-03-20 12:55

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('questions', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('date_created_on', models.DateTimeField(auto_now_add=True)),
                ('date_updated_on', models.DateTimeField(auto_now=True)),
                ('body', models.TextField()),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.Question')),
            ],
            options={
                'ordering': ['-date_created_on'],
            },
        ),
        migrations.CreateModel(
            name='AnswerVote',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('votes', models.IntegerField(default=0)),
                ('vote_type', models.TextField(default='none')),
                ('answer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='answers.Answer')),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='answervote',
            unique_together={('creator', 'answer', 'vote_type')},
        ),
    ]
