Skip to content

Commit

Permalink
Make dailytestrollup branch nullable (#365)
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 authored Oct 30, 2024
1 parent fccd479 commit 3721e80
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", "0028_remove_test_commits_where_fail_and_more"),
]

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 @@ -412,7 +412,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 3721e80

Please sign in to comment.