Skip to content

Commit ea16549

Browse files
committed
fix: applications sorting for postgres/mysql
Sqlite sorting is by default case sensitive. Postgres & mysql seem to be case insensitive text sorting. Sorting bytes is consistent between mysql,sqlite, and postgres.
1 parent 836c404 commit ea16549

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model/application.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ type Application struct {
5858
//
5959
// required: true
6060
// example: a1
61-
SortKey string `gorm:"uniqueIndex:uix_application_user_id_sort_key,priority:2,length:255" form:"sortKey" query:"sortKey" json:"sortKey"`
61+
SortKey string `gorm:"type:bytes;uniqueIndex:uix_application_user_id_sort_key,priority:2,length:255" form:"sortKey" query:"sortKey" json:"sortKey"`
6262
}

0 commit comments

Comments
 (0)