2023-12-31 14:30:25 +00:00
|
|
|
package setup
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
_ "embed"
|
|
|
|
|
|
|
|
"github.com/zitadel/zitadel/internal/database"
|
2024-01-25 16:28:20 +00:00
|
|
|
"github.com/zitadel/zitadel/internal/eventstore"
|
2023-12-31 14:30:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
//go:embed 19.sql
|
|
|
|
addCurrentSequencesIndex string
|
|
|
|
)
|
|
|
|
|
|
|
|
type AddCurrentSequencesIndex struct {
|
|
|
|
dbClient *database.DB
|
|
|
|
}
|
|
|
|
|
2024-01-25 16:28:20 +00:00
|
|
|
func (mig *AddCurrentSequencesIndex) Execute(ctx context.Context, _ eventstore.Event) error {
|
2023-12-31 14:30:25 +00:00
|
|
|
_, err := mig.dbClient.ExecContext(ctx, addCurrentSequencesIndex)
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (mig *AddCurrentSequencesIndex) String() string {
|
|
|
|
return "19_add_current_sequences_index"
|
|
|
|
}
|