Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: use asc by id as default activity order (#7842)

Danny Xu2c156f84d94c
diff --git a/backend/api/v1/logging_service.go b/backend/api/v1/logging_service.go
index 6519e0c681..eb3cfa639c 100644
--- a/backend/api/v1/logging_service.go
+++ b/backend/api/v1/logging_service.go
@@ -114,6 +114,9 @@ func (s *LoggingService) ListLogs(ctx context.Context, request *v1pb.ListLogsReq
order = api.ASC
}
activityFind.Order = &order
+ } else {
+ order := api.ASC
+ activityFind.Order = &order
}
for _, spec := range filters {
diff --git a/backend/store/activity.go b/backend/store/activity.go
index 89fb04d628..a1a392eb52 100644
--- a/backend/store/activity.go
+++ b/backend/store/activity.go
@@ -488,6 +488,8 @@ func listActivityImplV2(ctx context.Context, tx *Tx, find *FindActivityMessage)
if v := find.Order; v != nil {
query += fmt.Sprintf(" ORDER BY id %s", *v)
+ } else {
+ query += " ORDER BY id ASC"
}
if v := find.Limit; v != nil {
query += fmt.Sprintf(" LIMIT %d", *v)