mirror of
https://github.com/bugsink/bugsink.git
synced 2026-01-05 21:00:13 -06:00
Correctly order Turningpoints (as per comment)
This commit is contained in:
17
issues/migrations/0007_alter_turningpoint_options.py
Normal file
17
issues/migrations/0007_alter_turningpoint_options.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 4.2.16 on 2024-12-16 21:03
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("issues", "0006_issue_next_unmute_check"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="turningpoint",
|
||||
options={"ordering": ["-timestamp", "-id"]},
|
||||
),
|
||||
]
|
||||
@@ -407,7 +407,9 @@ class TurningPoint(models.Model):
|
||||
comment = models.TextField(blank=True, null=False, default="")
|
||||
|
||||
class Meta:
|
||||
ordering = ["-timestamp"]
|
||||
# by ordering on "-id" we order things that happen in a single ingestion in the order in which they happened.
|
||||
# (in particular: NEXT_MATERIALIZED followed by REGRESSED is a common pattern)
|
||||
ordering = ["-timestamp", "-id"]
|
||||
indexes = [
|
||||
models.Index(fields=["timestamp"]),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user