<reponame>ToniIvars/django-poll
# Generated by Django 3.2.3 on 2021-05-18 10:34

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='Poll',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='author', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PollAnswer',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.CharField(max_length=50)),
                ('votes', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='PollQuestion',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('answers', models.ManyToManyField(related_name='answers', to='my_polls.PollAnswer')),
                ('poll', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='poll', to='my_polls.poll')),
            ],
        ),
        migrations.AddField(
            model_name='pollanswer',
            name='poll_question',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='poll_question', to='my_polls.pollquestion'),
        ),
        migrations.AddField(
            model_name='poll',
            name='questions',
            field=models.ManyToManyField(related_name='questions', to='my_polls.PollQuestion'),
        ),
    ]

# Generated by Django 3.2.3 on 2021-05-18 10:34

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='Poll',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='author', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PollAnswer',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.CharField(max_length=50)),
                ('votes', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='PollQuestion',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('answers', models.ManyToManyField(related_name='answers', to='my_polls.PollAnswer')),
                ('poll', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='poll', to='my_polls.poll')),
            ],
        ),
        migrations.AddField(
            model_name='pollanswer',
            name='poll_question',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='poll_question', to='my_polls.pollquestion'),
        ),
        migrations.AddField(
            model_name='poll',
            name='questions',
            field=models.ManyToManyField(related_name='questions', to='my_polls.PollQuestion'),
        ),
    ]
# Generated by Django 3.2.3 on 2021-05-18 10:34