mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
moving cmd/setup/54.go cmd/setup/59.go
This commit is contained in:
32
cmd/setup/59.go
Normal file
32
cmd/setup/59.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package setup
|
||||
|
||||
import (
|
||||
"context"
|
||||
_ "embed"
|
||||
|
||||
"github.com/zitadel/zitadel/backend/v3/storage/database/dialect/postgres"
|
||||
"github.com/zitadel/zitadel/internal/database"
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
)
|
||||
|
||||
type TransactionalTables struct {
|
||||
dbClient *database.DB
|
||||
}
|
||||
|
||||
func (mig *TransactionalTables) Execute(ctx context.Context, _ eventstore.Event) error {
|
||||
config := &postgres.Config{Pool: mig.dbClient.Pool}
|
||||
pool, err := config.Connect(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return pool.Migrate(ctx)
|
||||
}
|
||||
|
||||
func (mig *TransactionalTables) String() string {
|
||||
return "59_repeatable_transactional_tables"
|
||||
}
|
||||
|
||||
func (mig *TransactionalTables) Check(lastRun map[string]interface{}) bool {
|
||||
return true
|
||||
}
|
Reference in New Issue
Block a user