2023-09-22 09:37:16 +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-09-22 09:37:16 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
//go:embed 13/13_fix_quota_constraints.sql
|
|
|
|
fixQuotaConstraints string
|
|
|
|
)
|
|
|
|
|
|
|
|
type FixQuotaConstraints struct {
|
|
|
|
dbClient *database.DB
|
|
|
|
}
|
|
|
|
|
2024-01-25 16:28:20 +00:00
|
|
|
func (mig *FixQuotaConstraints) Execute(ctx context.Context, _ eventstore.Event) error {
|
2023-09-22 09:37:16 +00:00
|
|
|
_, err := mig.dbClient.ExecContext(ctx, fixQuotaConstraints)
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (mig *FixQuotaConstraints) String() string {
|
|
|
|
return "13_fix_quota_constraints"
|
|
|
|
}
|