Skip to content

Commit

Permalink
Make dailytestrollup branch nullable
Browse files Browse the repository at this point in the history
We've been seeing a bunch of errors related to this field not being nullable.
This is because it's taking the branch from the commit, which _can_ be nullable.

See: [error](https://codecov.sentry.io/share/issue/478a3e60158547b69afa0b9959822237/)
  • Loading branch information
michelletran-codecov committed Oct 18, 2024
1 parent f408749 commit a711b12
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.15 on 2024-09-20 20:21

from django.db import migrations, models

"""
BEGIN;
--
-- Alter field branch on dailytestrollup
--
ALTER TABLE "reports_dailytestrollups" ALTER COLUMN "branch" DROP NOT NULL;
COMMIT;
"""


class Migration(migrations.Migration):
dependencies = [
("reports", "0024_auto_20240917_2121"),
]

operations = [
migrations.AlterField(
model_name="dailytestrollup",
name="branch",
field=models.TextField(null=True),
),
]
2 changes: 1 addition & 1 deletion shared/django_apps/reports/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ class PartitioningMeta:
)
date = models.DateField()
repoid = models.IntegerField()
branch = models.TextField()
branch = models.TextField(null=True)

fail_count = models.IntegerField()
flaky_fail_count = models.IntegerField()
Expand Down

0 comments on commit a711b12

Please sign in to comment.