diff --git a/migrations/cockroach/V1.100__idp_type.sql b/migrations/cockroach/V1.100__idp_type.sql index 0a6f391e8b..53f99c953c 100644 --- a/migrations/cockroach/V1.100__idp_type.sql +++ b/migrations/cockroach/V1.100__idp_type.sql @@ -4,10 +4,10 @@ ALTER TABLE zitadel.projections.idps ADD COLUMN type INT2; -- oidc-type is 0 WITH doa AS ( SELECT i.id, IF(o.idp_id IS NULL, 0, 2) as type - FROM projections.idps i - LEFT JOIN projections.idps_oidc_config o + FROM zitadel.projections.idps i + LEFT JOIN zitadel.projections.idps_oidc_config o ON o.idp_id = i.id - LEFT JOIN projections.idps_jwt_config j + LEFT JOIN zitadel.projections.idps_jwt_config j ON j.idp_id = i.id ) UPDATE zitadel.projections.idps SET type = doa.type FROM doa WHERE doa.id = zitadel.projections.idps.id;