mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:18:43 +00:00
fix(projections): unique index names (#4439)
This commit is contained in:
@@ -84,8 +84,8 @@ func newAppProjection(ctx context.Context, config crdb.StatementHandlerConfig) *
|
||||
crdb.NewColumn(AppColumnSequence, crdb.ColumnTypeInt64),
|
||||
},
|
||||
crdb.NewPrimaryKey(AppColumnInstanceID, AppColumnID),
|
||||
crdb.WithIndex(crdb.NewIndex("app_project_id_idx", []string{AppColumnProjectID})),
|
||||
crdb.WithConstraint(crdb.NewConstraint("app_id_unique", []string{AppColumnID})),
|
||||
crdb.WithIndex(crdb.NewIndex("app3_project_id_idx", []string{AppColumnProjectID})),
|
||||
crdb.WithConstraint(crdb.NewConstraint("app3_id_unique", []string{AppColumnID})),
|
||||
),
|
||||
crdb.NewSuffixedTable([]*crdb.Column{
|
||||
crdb.NewColumn(AppAPIConfigColumnAppID, crdb.ColumnTypeText),
|
||||
@@ -96,8 +96,8 @@ func newAppProjection(ctx context.Context, config crdb.StatementHandlerConfig) *
|
||||
},
|
||||
crdb.NewPrimaryKey(AppAPIConfigColumnInstanceID, AppAPIConfigColumnAppID),
|
||||
appAPITableSuffix,
|
||||
crdb.WithForeignKey(crdb.NewForeignKeyOfPublicKeys("fk_api_ref_apps")),
|
||||
crdb.WithIndex(crdb.NewIndex("api_client_id_idx", []string{AppAPIConfigColumnClientID})),
|
||||
crdb.WithForeignKey(crdb.NewForeignKeyOfPublicKeys("fk_api_ref_apps3")),
|
||||
crdb.WithIndex(crdb.NewIndex("api_client_id3_idx", []string{AppAPIConfigColumnClientID})),
|
||||
),
|
||||
crdb.NewSuffixedTable([]*crdb.Column{
|
||||
crdb.NewColumn(AppOIDCConfigColumnAppID, crdb.ColumnTypeText),
|
||||
@@ -121,8 +121,8 @@ func newAppProjection(ctx context.Context, config crdb.StatementHandlerConfig) *
|
||||
},
|
||||
crdb.NewPrimaryKey(AppOIDCConfigColumnInstanceID, AppOIDCConfigColumnAppID),
|
||||
appOIDCTableSuffix,
|
||||
crdb.WithForeignKey(crdb.NewForeignKeyOfPublicKeys("fk_oidc_ref_apps")),
|
||||
crdb.WithIndex(crdb.NewIndex("oidc_client_id_idx", []string{AppOIDCConfigColumnClientID})),
|
||||
crdb.WithForeignKey(crdb.NewForeignKeyOfPublicKeys("fk_oidc_ref_apps3")),
|
||||
crdb.WithIndex(crdb.NewIndex("oidc_client_id_idx3", []string{AppOIDCConfigColumnClientID})),
|
||||
),
|
||||
crdb.NewSuffixedTable([]*crdb.Column{
|
||||
crdb.NewColumn(AppSAMLConfigColumnAppID, crdb.ColumnTypeText),
|
||||
@@ -133,8 +133,8 @@ func newAppProjection(ctx context.Context, config crdb.StatementHandlerConfig) *
|
||||
},
|
||||
crdb.NewPrimaryKey(AppSAMLConfigColumnInstanceID, AppSAMLConfigColumnAppID),
|
||||
appSAMLTableSuffix,
|
||||
crdb.WithForeignKey(crdb.NewForeignKeyOfPublicKeys("fk_saml_ref_apps")),
|
||||
crdb.WithIndex(crdb.NewIndex("saml_entity_id_idx", []string{AppSAMLConfigColumnEntityID})),
|
||||
crdb.WithForeignKey(crdb.NewForeignKeyOfPublicKeys("fk_saml_ref_apps3")),
|
||||
crdb.WithIndex(crdb.NewIndex("saml_entity_id_idx3", []string{AppSAMLConfigColumnEntityID})),
|
||||
),
|
||||
)
|
||||
p.StatementHandler = crdb.NewStatementHandler(ctx, config)
|
||||
|
Reference in New Issue
Block a user