Skip to content

Commit

Permalink
fix: remove timestamps from flake model
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 committed Dec 13, 2024
1 parent e41a4a1 commit cde158f
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 cde158f

Please sign in to comment.