mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 20:08:02 +00:00
a5d4b08a99
* fix(setup): unmarshal of failed step * fix(cleanup): cleanup all stuck states * use lastRun for repeatable steps * typo --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
28 lines
580 B
Go
28 lines
580 B
Go
package setup
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zitadel/zitadel/internal/eventstore"
|
|
"github.com/zitadel/zitadel/internal/query/projection"
|
|
)
|
|
|
|
type projectionTables struct {
|
|
es *eventstore.Eventstore
|
|
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
func (mig *projectionTables) Check(lastRun map[string]interface{}) bool {
|
|
currentVersion, _ := lastRun["version"].(string)
|
|
return currentVersion != mig.Version
|
|
}
|
|
|
|
func (mig *projectionTables) Execute(ctx context.Context) error {
|
|
return projection.Init(ctx)
|
|
}
|
|
|
|
func (mig *projectionTables) String() string {
|
|
return "projection_tables"
|
|
}
|