zitadel/cmd/setup/20.go
Silvan a31191d9e2
fix(auth): efficient user session projection (#7187)
* fix(auth): cache users during session projection

* fix(auth.user_sessions): add index for more efficient by user search

(cherry picked from commit 43f1d59649)
2024-01-11 08:33:49 +01:00

27 lines
474 B
Go

package setup
import (
"context"
_ "embed"
"github.com/zitadel/zitadel/internal/database"
)
var (
//go:embed 20.sql
addByUserIndexToSession string
)
type AddByUserIndexToSession struct {
dbClient *database.DB
}
func (mig *AddByUserIndexToSession) Execute(ctx context.Context) error {
_, err := mig.dbClient.ExecContext(ctx, addByUserIndexToSession)
return err
}
func (mig *AddByUserIndexToSession) String() string {
return "20_add_by_user_index_on_session"
}