diff --git a/approval_polls/migrations/0001_initial.py b/approval_polls/migrations/0001_initial.py new file mode 100644 index 0000000..bc15bbb --- /dev/null +++ b/approval_polls/migrations/0001_initial.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [] + + operations = [ + migrations.CreateModel( + name="Ballot", + fields=[ + ( + "id", + models.AutoField( + verbose_name="ID", + serialize=False, + auto_created=True, + primary_key=True, + ), + ), + ("timestamp", models.DateTimeField(verbose_name=b"time voted")), + ], + ), + migrations.CreateModel( + name="Choice", + fields=[ + ( + "id", + models.AutoField( + verbose_name="ID", + serialize=False, + auto_created=True, + primary_key=True, + ), + ), + ("choice_text", models.CharField(max_length=200)), + ], + ), + migrations.CreateModel( + name="Poll", + fields=[ + ( + "id", + models.AutoField( + verbose_name="ID", + serialize=False, + auto_created=True, + primary_key=True, + ), + ), + ("question", models.CharField(max_length=200)), + ("pub_date", models.DateTimeField(verbose_name=b"date published")), + ], + ), + migrations.CreateModel( + name="Vote", + fields=[ + ( + "id", + models.AutoField( + verbose_name="ID", + serialize=False, + auto_created=True, + primary_key=True, + ), + ), + ("ballot", models.ForeignKey(on_delete=models.CASCADE, to="approval_polls.Ballot")), + ("choice", models.ForeignKey(on_delete=models.CASCADE, to="approval_polls.Choice")), + ], + ), + migrations.AddField( + model_name="choice", + name="poll", + field=models.ForeignKey(on_delete=models.CASCADE, to="approval_polls.Poll"), + ), + migrations.AddField( + model_name="ballot", + name="poll", + field=models.ForeignKey(on_delete=models.CASCADE, blank=True, to="approval_polls.Poll", null=True), + ), + ] diff --git a/approval_polls/migrations/0002_poll_user.py b/approval_polls/migrations/0002_poll_user.py new file mode 100644 index 0000000..5453938 --- /dev/null +++ b/approval_polls/migrations/0002_poll_user.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + + +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ("approval_polls", "0001_initial"), + ] + + operations = [ + migrations.AddField( + model_name="poll", + name="user", + field=models.ForeignKey(on_delete=models.CASCADE, default=0, to=settings.AUTH_USER_MODEL), + preserve_default=False, + ), + ] diff --git a/approval_polls/migrations/0003_ballot_user.py b/approval_polls/migrations/0003_ballot_user.py new file mode 100644 index 0000000..76ca68b --- /dev/null +++ b/approval_polls/migrations/0003_ballot_user.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + + +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ("approval_polls", "0002_poll_user"), + ] + + operations = [ + migrations.AddField( + model_name="ballot", + name="user", + field=models.ForeignKey(on_delete=models.CASCADE, blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + ] diff --git a/approval_polls/migrations/0004_poll_vtype.py b/approval_polls/migrations/0004_poll_vtype.py new file mode 100644 index 0000000..68405e1 --- /dev/null +++ b/approval_polls/migrations/0004_poll_vtype.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0003_ballot_user"), + ] + + operations = [ + migrations.AddField( + model_name="poll", + name="vtype", + field=models.IntegerField(default=2), + ), + ] diff --git a/approval_polls/migrations/0005_poll_close_date.py b/approval_polls/migrations/0005_poll_close_date.py new file mode 100644 index 0000000..c6aa642 --- /dev/null +++ b/approval_polls/migrations/0005_poll_close_date.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0004_poll_vtype"), + ] + + operations = [ + migrations.AddField( + model_name="poll", + name="close_date", + field=models.DateTimeField( + null=True, verbose_name=b"date closed", blank=True + ), + ), + ] diff --git a/approval_polls/migrations/0006_poll_show_close_date.py b/approval_polls/migrations/0006_poll_show_close_date.py new file mode 100644 index 0000000..291a391 --- /dev/null +++ b/approval_polls/migrations/0006_poll_show_close_date.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0005_poll_close_date"), + ] + + operations = [ + migrations.AddField( + model_name="poll", + name="show_close_date", + field=models.BooleanField(default=False), + ), + ] diff --git a/approval_polls/migrations/0007_poll_show_countdown.py b/approval_polls/migrations/0007_poll_show_countdown.py new file mode 100644 index 0000000..e9688ef --- /dev/null +++ b/approval_polls/migrations/0007_poll_show_countdown.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0006_poll_show_close_date"), + ] + + operations = [ + migrations.AddField( + model_name="poll", + name="show_countdown", + field=models.BooleanField(default=False), + ), + ] diff --git a/approval_polls/migrations/0008_poll_show_write_in.py b/approval_polls/migrations/0008_poll_show_write_in.py new file mode 100644 index 0000000..fcfba7e --- /dev/null +++ b/approval_polls/migrations/0008_poll_show_write_in.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0007_poll_show_countdown"), + ] + + operations = [ + migrations.AddField( + model_name="poll", + name="show_write_in", + field=models.BooleanField(default=False), + ), + ] diff --git a/approval_polls/migrations/0009_poll_show_lead_color.py b/approval_polls/migrations/0009_poll_show_lead_color.py new file mode 100644 index 0000000..108d1cd --- /dev/null +++ b/approval_polls/migrations/0009_poll_show_lead_color.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0008_poll_show_write_in"), + ] + + operations = [ + migrations.AddField( + model_name="poll", + name="show_lead_color", + field=models.BooleanField(default=False), + ), + ] diff --git a/approval_polls/migrations/0010_voteinvitation_poll_is_private.py b/approval_polls/migrations/0010_voteinvitation_poll_is_private.py new file mode 100644 index 0000000..b20a847 --- /dev/null +++ b/approval_polls/migrations/0010_voteinvitation_poll_is_private.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0009_poll_show_lead_color"), + ] + + operations = [ + migrations.CreateModel( + name="VoteInvitation", + fields=[ + ( + "id", + models.AutoField( + verbose_name="ID", + serialize=False, + auto_created=True, + primary_key=True, + ), + ), + ( + "email", + models.EmailField(max_length=254, verbose_name=b"voter email"), + ), + ( + "sent_date", + models.DateTimeField( + null=True, verbose_name=b"invite sent on", blank=True + ), + ), + ( + "key", + models.CharField(unique=True, max_length=64, verbose_name=b"key"), + ), + ( + "ballot", + models.ForeignKey(on_delete=models.CASCADE, + blank=True, to="approval_polls.Ballot", null=True + ), + ), + ], + ), + migrations.AddField( + model_name="poll", + name="is_private", + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name="voteinvitation", + name="poll", + field=models.ForeignKey(on_delete=models.CASCADE, to="approval_polls.Poll"), + ), + ] diff --git a/approval_polls/migrations/0011_choice_choice_link.py b/approval_polls/migrations/0011_choice_choice_link.py new file mode 100644 index 0000000..134f2c4 --- /dev/null +++ b/approval_polls/migrations/0011_choice_choice_link.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0010_voteinvitation_poll_is_private"), + ] + + operations = [ + migrations.AddField( + model_name="choice", + name="choice_link", + field=models.CharField(max_length=2048, null=True, blank=True), + ), + ] diff --git a/approval_polls/migrations/0012_subscription.py b/approval_polls/migrations/0012_subscription.py new file mode 100644 index 0000000..b20b42b --- /dev/null +++ b/approval_polls/migrations/0012_subscription.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + + +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ("approval_polls", "0011_choice_choice_link"), + ] + + operations = [ + migrations.CreateModel( + name="Subscription", + fields=[ + ( + "id", + models.AutoField( + verbose_name="ID", + serialize=False, + auto_created=True, + primary_key=True, + ), + ), + ("zipcode", models.CharField(max_length=5)), + ("user", models.ForeignKey(on_delete=models.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/approval_polls/migrations/0013_poll_is_suspended.py b/approval_polls/migrations/0013_poll_is_suspended.py new file mode 100644 index 0000000..04f604b --- /dev/null +++ b/approval_polls/migrations/0013_poll_is_suspended.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0012_subscription"), + ] + + operations = [ + migrations.AddField( + model_name="poll", + name="is_suspended", + field=models.BooleanField(default=False), + ), + ] diff --git a/approval_polls/migrations/0014_polltag.py b/approval_polls/migrations/0014_polltag.py new file mode 100644 index 0000000..a4aaa1a --- /dev/null +++ b/approval_polls/migrations/0014_polltag.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0013_poll_is_suspended"), + ] + + operations = [ + migrations.CreateModel( + name="PollTag", + fields=[ + ( + "id", + models.AutoField( + verbose_name="ID", + serialize=False, + auto_created=True, + primary_key=True, + ), + ), + ("tag_text", models.CharField(max_length=100)), + ("polls", models.ManyToManyField(to="approval_polls.Poll")), + ], + ), + ] diff --git a/approval_polls/migrations/0015_email_opt_in.py b/approval_polls/migrations/0015_email_opt_in.py new file mode 100644 index 0000000..b2cce47 --- /dev/null +++ b/approval_polls/migrations/0015_email_opt_in.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0014_polltag"), + ] + + operations = [ + migrations.AddField( + model_name="poll", + name="show_email_opt_in", + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name="vote", + name="email", + field=models.EmailField(max_length=254, unique=True, null=True, blank=True), + ), + migrations.AddField( + model_name="vote", + name="permit_email", + field=models.BooleanField(default=False), + ), + ] diff --git a/approval_polls/migrations/0016_update_email_opt_in.py b/approval_polls/migrations/0016_update_email_opt_in.py new file mode 100644 index 0000000..61bb034 --- /dev/null +++ b/approval_polls/migrations/0016_update_email_opt_in.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0015_email_opt_in"), + ] + + operations = [ + migrations.RemoveField( + model_name="vote", + name="email", + ), + migrations.RemoveField( + model_name="vote", + name="permit_email", + ), + migrations.AddField( + model_name="ballot", + name="email", + field=models.EmailField(max_length=254, unique=True, null=True, blank=True), + ), + migrations.AddField( + model_name="ballot", + name="permit_email", + field=models.BooleanField(default=False), + ), + ] diff --git a/approval_polls/migrations/0017_ballot_remove_unique_email.py b/approval_polls/migrations/0017_ballot_remove_unique_email.py new file mode 100644 index 0000000..d08c917 --- /dev/null +++ b/approval_polls/migrations/0017_ballot_remove_unique_email.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0016_update_email_opt_in"), + ] + + operations = [ + migrations.AlterField( + model_name="ballot", + name="email", + field=models.EmailField(max_length=254, null=True, blank=True), + ), + ] diff --git a/approval_polls/migrations/0018_auto_20230511_0246.py b/approval_polls/migrations/0018_auto_20230511_0246.py new file mode 100644 index 0000000..d77ce8c --- /dev/null +++ b/approval_polls/migrations/0018_auto_20230511_0246.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("approval_polls", "0017_ballot_remove_unique_email"), + ] + + operations = [ + migrations.AlterField( + model_name="ballot", + name="timestamp", + field=models.DateTimeField(verbose_name="time voted"), + ), + migrations.AlterField( + model_name="poll", + name="close_date", + field=models.DateTimeField( + null=True, verbose_name="date closed", blank=True + ), + ), + migrations.AlterField( + model_name="poll", + name="pub_date", + field=models.DateTimeField(verbose_name="date published"), + ), + migrations.AlterField( + model_name="voteinvitation", + name="email", + field=models.EmailField(max_length=254, verbose_name="voter email"), + ), + migrations.AlterField( + model_name="voteinvitation", + name="key", + field=models.CharField(unique=True, max_length=64, verbose_name="key"), + ), + migrations.AlterField( + model_name="voteinvitation", + name="sent_date", + field=models.DateTimeField( + null=True, verbose_name="invite sent on", blank=True + ), + ), + ] diff --git a/approval_polls/migrations/__init__.py b/approval_polls/migrations/__init__.py new file mode 100644 index 0000000..e69de29