mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
fix(eventstore): consider IsGlobal
-flag of constraints (#7518)
* fix(eventstore): consider `IsGlobal`-flag of constraints * fix(setup): set `instance_domain`-constraint global
This commit is contained in:
27
cmd/setup/23.go
Normal file
27
cmd/setup/23.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package setup
|
||||
|
||||
import (
|
||||
"context"
|
||||
_ "embed"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/database"
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed 23.sql
|
||||
correctGlobalUniqueConstraints string
|
||||
)
|
||||
|
||||
type CorrectGlobalUniqueConstraints struct {
|
||||
dbClient *database.DB
|
||||
}
|
||||
|
||||
func (mig *CorrectGlobalUniqueConstraints) Execute(ctx context.Context, _ eventstore.Event) error {
|
||||
_, err := mig.dbClient.ExecContext(ctx, correctGlobalUniqueConstraints)
|
||||
return err
|
||||
}
|
||||
|
||||
func (mig *CorrectGlobalUniqueConstraints) String() string {
|
||||
return "23_correct_global_unique_constraints"
|
||||
}
|
Reference in New Issue
Block a user