mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:27:32 +00:00
chore: move the go code into a subfolder
This commit is contained in:
27
apps/api/cmd/setup/projections.go
Normal file
27
apps/api/cmd/setup/projections.go
Normal file
@@ -0,0 +1,27 @@
|
||||
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, _ eventstore.Event) error {
|
||||
return projection.Init(ctx)
|
||||
}
|
||||
|
||||
func (mig *projectionTables) String() string {
|
||||
return "projection_tables"
|
||||
}
|
Reference in New Issue
Block a user