mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
fix(storage): add indexes for auth.tokens
(#5259)
* fix(storage): add indexes for `auth.tokens` * refactor: naming
This commit is contained in:
25
cmd/setup/08.go
Normal file
25
cmd/setup/08.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package setup
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed 08.sql
|
||||
tokenIndexes08 string
|
||||
)
|
||||
|
||||
type AuthTokenIndexes struct {
|
||||
dbClient *sql.DB
|
||||
}
|
||||
|
||||
func (mig *AuthTokenIndexes) Execute(ctx context.Context) error {
|
||||
_, err := mig.dbClient.ExecContext(ctx, tokenIndexes08)
|
||||
return err
|
||||
}
|
||||
|
||||
func (mig *AuthTokenIndexes) String() string {
|
||||
return "08_auth_token_indexes"
|
||||
}
|
Reference in New Issue
Block a user