mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:57:31 +00:00
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
This commit is contained in:
26
cmd/setup/20.go
Normal file
26
cmd/setup/20.go
Normal file
@@ -0,0 +1,26 @@
|
||||
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"
|
||||
}
|
Reference in New Issue
Block a user