mirror of
https://github.com/zitadel/zitadel.git
synced 2026-07-25 18:28:00 +00:00
# Which Problems Are Solved Login v2 uses the `users.v2.ListUsers`-endpoint to get a user by login name. This query had an inefficient `WHERE`-clause. # How the Problems Are Solved Update the view and use a specific clause for this query. # Additional information Added in https://github.com/zitadel/zitadel/pull/10475 --------- Co-authored-by: Marco A. <kwbmm1990@gmail.com> Co-authored-by: Livio Spring <9405495+livio-a@users.noreply.github.com>
28 lines
562 B
Go
28 lines
562 B
Go
package setup
|
|
|
|
import (
|
|
"context"
|
|
_ "embed"
|
|
|
|
"github.com/zitadel/zitadel/internal/database"
|
|
"github.com/zitadel/zitadel/internal/eventstore"
|
|
)
|
|
|
|
var (
|
|
//go:embed 72.sql
|
|
addColumnsToLoginNamesView string
|
|
)
|
|
|
|
type AddColumnsToLoginNamesView struct {
|
|
dbClient *database.DB
|
|
}
|
|
|
|
func (mig *AddColumnsToLoginNamesView) Execute(ctx context.Context, _ eventstore.Event) error {
|
|
_, err := mig.dbClient.ExecContext(ctx, addColumnsToLoginNamesView)
|
|
return err
|
|
}
|
|
|
|
func (mig *AddColumnsToLoginNamesView) String() string {
|
|
return "72_add_columns_to_login_names_view"
|
|
}
|