Skip to content

Commit

Permalink
Restore migrations files.
Browse files Browse the repository at this point in the history
  • Loading branch information
fsargent committed Jun 6, 2024
1 parent 44d141f commit 59bade3
Show file tree
Hide file tree
Showing 19 changed files with 511 additions and 0 deletions.
83 changes: 83 additions & 0 deletions approval_polls/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
21 changes: 21 additions & 0 deletions approval_polls/migrations/0002_poll_user.py
Original file line number Diff line number Diff line change
@@ -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,
),
]
20 changes: 20 additions & 0 deletions approval_polls/migrations/0003_ballot_user.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
18 changes: 18 additions & 0 deletions approval_polls/migrations/0004_poll_vtype.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
20 changes: 20 additions & 0 deletions approval_polls/migrations/0005_poll_close_date.py
Original file line number Diff line number Diff line change
@@ -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
),
),
]
18 changes: 18 additions & 0 deletions approval_polls/migrations/0006_poll_show_close_date.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
18 changes: 18 additions & 0 deletions approval_polls/migrations/0007_poll_show_countdown.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
18 changes: 18 additions & 0 deletions approval_polls/migrations/0008_poll_show_write_in.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
18 changes: 18 additions & 0 deletions approval_polls/migrations/0009_poll_show_lead_color.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
57 changes: 57 additions & 0 deletions approval_polls/migrations/0010_voteinvitation_poll_is_private.py
Original file line number Diff line number Diff line change
@@ -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"),
),
]
18 changes: 18 additions & 0 deletions approval_polls/migrations/0011_choice_choice_link.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
31 changes: 31 additions & 0 deletions approval_polls/migrations/0012_subscription.py
Original file line number Diff line number Diff line change
@@ -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)),
],
),
]
18 changes: 18 additions & 0 deletions approval_polls/migrations/0013_poll_is_suspended.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
Loading

0 comments on commit 59bade3

Please sign in to comment.