Skip to content

Commit

Permalink
Refactor to default false
Browse files Browse the repository at this point in the history
  • Loading branch information
RulaAbuHasna committed Oct 3, 2024
1 parent bf3b6ee commit 359e99c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 4.2.16 on 2024-10-03 11:55

from django.db import migrations, models


class Migration(migrations.Migration):
"""
BEGIN;
--
-- Add field email_opt_in to user
--
ALTER TABLE "users" ADD COLUMN "email_opt_in" boolean DEFAULT false NOT NULL;
ALTER TABLE "users" ALTER COLUMN "email_opt_in" DROP DEFAULT;
COMMIT;
"""

dependencies = [
("codecov_auth", "0060_owner_upload_token_required_for_public_repos"),
]

operations = [
migrations.AddField(
model_name="user",
name="email_opt_in",
field=models.BooleanField(default=False),
),
]
1 change: 1 addition & 0 deletions shared/django_apps/codecov_auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class CustomerIntent(models.TextChoices):
terms_agreement = models.BooleanField(null=True, default=False, blank=True)
terms_agreement_at = DateTimeWithoutTZField(null=True, blank=True)
customer_intent = models.TextField(choices=CustomerIntent.choices, null=True)
email_opt_in = models.BooleanField(default=False)

REQUIRED_FIELDS = []
USERNAME_FIELD = "external_id"
Expand Down

0 comments on commit 359e99c

Please sign in to comment.