services/sqlstore: Order results in UserSearch by username/email (#23328)

* services/sqlstore: Order results in UserSearch by username/email
* Add index (login,email) on user table
This commit is contained in:
Arve Knudsen
2020-04-03 19:15:10 +02:00
committed by GitHub
parent b86789c66b
commit 0fd6edab64
3 changed files with 5 additions and 3 deletions
@@ -122,6 +122,10 @@ func addUserMigrations(mg *Migrator) {
mg.AddMigration("Add is_disabled column to user", NewAddColumnMigration(userV2, &Column{
Name: "is_disabled", Type: DB_Bool, Nullable: false, Default: "0",
}))
mg.AddMigration("Add index user.login/user.email", NewAddIndexMigration(userV2, &Index{
Cols: []string{"login", "email"},
}))
}
type AddMissingUserSaltAndRandsMigration struct {