Skip to content

Commit

Permalink
fix: make TestInstance duration_seconds nullable (#398)
Browse files Browse the repository at this point in the history
* feat: create LastRollupDate model

this will be used in cache rollup cron to determine which repo branch
combos to run the cache test rollups task for

* fix: make TestInstance duration_seconds nullable

* chore: make lint

* fix: reorder migrations

* fix: update duration_seconds->null migration
  • Loading branch information
joseph-sentry authored Nov 27, 2024
1 parent d318691 commit 1a0a7ae
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.16 on 2024-11-27 14:46

from django.db import migrations, models

"""
BEGIN;
--
-- Alter field duration_seconds on testinstance
--
ALTER TABLE "reports_testinstance" ALTER COLUMN "duration_seconds" DROP NOT NULL;
COMMIT;
"""


class Migration(migrations.Migration):
dependencies = [
("reports", "0032_reportsession_reports_upload_order_number"),
]

operations = [
migrations.AlterField(
model_name="testinstance",
name="duration_seconds",
field=models.FloatField(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 @@ -301,7 +301,7 @@ class Outcome(models.TextChoices):
ERROR = "error"
PASS = "pass"

duration_seconds = models.FloatField()
duration_seconds = models.FloatField(null=True)
outcome = models.CharField(max_length=100, choices=Outcome.choices)
upload = models.ForeignKey(
"ReportSession",
Expand Down

0 comments on commit 1a0a7ae

Please sign in to comment.