Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make plan non-nullable and drop plan type #533

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
changes plan to be nonnullable and drops plan default from owner
  • Loading branch information
ajay-sentry committed Feb 24, 2025
commit d186cb568c4bd19f86a9275713c5f2fdbb396b26
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.16 on 2025-02-24 23:48

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("codecov_auth", "0066_add_pro_plan"),
]

operations = [
migrations.RunSQL("ALTER TABLE owners ALTER COLUMN plan DROP DEFAULT;"),
migrations.AlterField(
model_name="owner",
name="plan",
field=models.TextField(blank=True, default="users-developer"),
),
]
4 changes: 1 addition & 3 deletions shared/django_apps/codecov_auth/models.py
Original file line number Diff line number Diff line change
@@ -327,9 +327,7 @@ class Meta:
staff = models.BooleanField(null=True, default=False)
cache = models.JSONField(null=True)
# Really an ENUM in db
plan = models.TextField(
null=True, default=PlanName.USERS_DEVELOPER.value, blank=True
)
plan = models.TextField(default=PlanName.USERS_DEVELOPER.value, blank=True)
plan_provider = models.TextField(
null=True, choices=PlanProviders.choices, blank=True
) # postgres enum containing only "github"
Loading
Oops, something went wrong.