convert statuses.visibility and notifications.notification_type columns from type string -> int for performance / space savings

This commit is contained in:
kim 2024-11-21 17:03:53 +00:00
commit 759df1240a
21 changed files with 586 additions and 84 deletions

View file

@ -41,7 +41,7 @@ func APIVisToVis(m apimodel.Visibility) gtsmodel.Visibility {
case apimodel.VisibilityNone:
return gtsmodel.VisibilityNone
}
return ""
return 0
}
func APIMarkerNameToMarkerName(m apimodel.MarkerName) gtsmodel.MarkerName {

View file

@ -1862,7 +1862,7 @@ func (c *Converter) NotificationToAPINotification(
return &apimodel.Notification{
ID: n.ID,
Type: string(n.NotificationType),
Type: n.NotificationType.String(),
CreatedAt: util.FormatISO8601(n.CreatedAt),
Account: apiAccount,
Status: apiStatus,