Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 2674ae9

Browse files
fix: remove timestamps from flake model (#456)
we don't require these fields for the Flake model
1 parent e41a4a1 commit 2674ae9

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Generated by Django 4.2.16 on 2024-12-13 15:44
2+
3+
from django.db import migrations
4+
5+
from shared.django_apps.migration_utils import RiskyRemoveField
6+
7+
"""
8+
BEGIN;
9+
--
10+
-- Remove field created_at from flake
11+
--
12+
ALTER TABLE "reports_flake" DROP COLUMN "created_at" CASCADE;
13+
--
14+
-- Remove field updated_at from flake
15+
--
16+
ALTER TABLE "reports_flake" DROP COLUMN "updated_at" CASCADE;
17+
COMMIT;
18+
"""
19+
20+
21+
class Migration(migrations.Migration):
22+
dependencies = [
23+
("reports", "0033_alter_testinstance_duration_seconds"),
24+
]
25+
26+
operations = [
27+
RiskyRemoveField(
28+
model_name="flake",
29+
name="created_at",
30+
),
31+
RiskyRemoveField(
32+
model_name="flake",
33+
name="updated_at",
34+
),
35+
]

shared/django_apps/reports/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ class Meta:
373373
]
374374

375375

376-
class Flake(BaseModel):
376+
class Flake(models.Model):
377+
id = models.BigAutoField(primary_key=True)
377378
repository = models.ForeignKey(
378379
"core.Repository",
379380
db_column="repoid",

0 commit comments

Comments
 (0)