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

View File

@@ -68,7 +68,6 @@ func (ss *SqlStore) Init() error {
ss.readConfig()
engine, err := ss.getEngine()
if err != nil {
return fmt.Errorf("Fail to connect to database: %v", err)
}
@@ -232,7 +231,6 @@ func (ss *SqlStore) buildConnectionString() (string, error) {
func (ss *SqlStore) getEngine() (*xorm.Engine, error) {
connectionString, err := ss.buildConnectionString()
if err != nil {
return nil, err
}