Skip to content

Commit

Permalink
fix: remove timestamps from flake model (#456)
Browse files Browse the repository at this point in the history
we don't require these fields for the Flake model
  • Loading branch information
joseph-sentry authored Dec 16, 2024
1 parent e41a4a1 commit 2674ae9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Generated by Django 4.2.16 on 2024-12-13 15:44

from django.db import migrations

from shared.django_apps.migration_utils import RiskyRemoveField

"""
BEGIN;
--
-- Remove field created_at from flake
--
ALTER TABLE "reports_flake" DROP COLUMN "created_at" CASCADE;
--
-- Remove field updated_at from flake
--
ALTER TABLE "reports_flake" DROP COLUMN "updated_at" CASCADE;
COMMIT;
"""


class Migration(migrations.Migration):
dependencies = [
("reports", "0033_alter_testinstance_duration_seconds"),
]

operations = [
RiskyRemoveField(
model_name="flake",
name="created_at",
),
RiskyRemoveField(
model_name="flake",
name="updated_at",
),
]
3 changes: 2 additions & 1 deletion shared/django_apps/reports/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ class Meta:
]


class Flake(BaseModel):
class Flake(models.Model):
id = models.BigAutoField(primary_key=True)
repository = models.ForeignKey(
"core.Repository",
db_column="repoid",
Expand Down

0 comments on commit 2674ae9

Please sign in to comment.