diff --git a/pkg/services/sqlstore/migrations/user_auth_token_mig.go b/pkg/services/sqlstore/migrations/user_auth_token_mig.go index 9794b7a78c7..990d549002a 100644 --- a/pkg/services/sqlstore/migrations/user_auth_token_mig.go +++ b/pkg/services/sqlstore/migrations/user_auth_token_mig.go @@ -23,10 +23,13 @@ func addUserAuthTokenMigrations(mg *Migrator) { Indices: []*Index{ {Cols: []string{"auth_token"}, Type: UniqueIndex}, {Cols: []string{"prev_auth_token"}, Type: UniqueIndex}, + {Cols: []string{"user_id"}, Type: IndexType}, }, } mg.AddMigration("create user auth token table", NewAddTableMigration(userAuthTokenV1)) mg.AddMigration("add unique index user_auth_token.auth_token", NewAddIndexMigration(userAuthTokenV1, userAuthTokenV1.Indices[0])) mg.AddMigration("add unique index user_auth_token.prev_auth_token", NewAddIndexMigration(userAuthTokenV1, userAuthTokenV1.Indices[1])) + + mg.AddMigration("add index user_auth_token.user_id", NewAddIndexMigration(userAuthTokenV1, userAuthTokenV1.Indices[2])) }