Skip to content

Commit

Permalink
[ODS-6408] Upgrading the Security DB creates a now deprecated Resourc…
Browse files Browse the repository at this point in the history
…eClaim (#1130)
  • Loading branch information
mjaksn authored Aug 30, 2024
1 parent 80cc2da commit ca72865
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ BEGIN
VALUES (N'assessmentMetadata', N'http://ed-fi.org/ods/identity/claims/domains/assessmentMetadata', NULL);
END

IF NOT EXISTS (SELECT 1 FROM [dbo].[ResourceClaims] WHERE [ClaimName] = 'http://ed-fi.org/ods/identity/claims/domains/identity' )
IF NOT EXISTS (SELECT 1 FROM [dbo].[ResourceClaims] WHERE [ClaimName] = 'http://ed-fi.org/ods/identity/claims/services/identity' )
BEGIN
INSERT [dbo].[ResourceClaims] ( [ResourceName], [ClaimName], [ParentResourceClaimId])
VALUES (N'identity', N'http://ed-fi.org/ods/identity/claims/domains/identity', NULL);
VALUES (N'identity', N'http://ed-fi.org/ods/identity/claims/services/identity', NULL);
END

IF NOT EXISTS (SELECT 1 FROM [dbo].[ResourceClaims] WHERE [ClaimName] = 'http://ed-fi.org/ods/identity/claims/domains/educationStandards' )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ begin
VALUES ('assessmentMetadata', 'http://ed-fi.org/ods/identity/claims/domains/assessmentMetadata', null);
END IF;

IF NOT EXISTS(SELECT 1 FROM dbo.ResourceClaims WHERE ClaimName ='http://ed-fi.org/ods/identity/claims/domains/identity') THEN
IF NOT EXISTS(SELECT 1 FROM dbo.ResourceClaims WHERE ClaimName ='http://ed-fi.org/ods/identity/claims/services/identity') THEN
insert into dbo.ResourceClaims (ResourceName, ClaimName, ParentResourceClaimId)
values ('identity', 'http://ed-fi.org/ods/identity/claims/domains/identity', null);
values ('identity', 'http://ed-fi.org/ods/identity/claims/services/identity', null);
END IF;

IF NOT EXISTS(SELECT 1 FROM dbo.ResourceClaims WHERE ClaimName ='http://ed-fi.org/ods/identity/claims/domains/educationStandards') THEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ BEGIN
VALUES (N'assessmentMetadata', N'http://ed-fi.org/ods/identity/claims/domains/assessmentMetadata', NULL);
END

IF NOT EXISTS (SELECT 1 FROM [dbo].[ResourceClaims] WHERE [ClaimName] = 'http://ed-fi.org/ods/identity/claims/domains/identity')
IF NOT EXISTS (SELECT 1 FROM [dbo].[ResourceClaims] WHERE [ClaimName] = 'http://ed-fi.org/ods/identity/claims/services/identity')
BEGIN
INSERT [dbo].[ResourceClaims] ([ResourceName], [ClaimName], [ParentResourceClaimId])
VALUES (N'identity', N'http://ed-fi.org/ods/identity/claims/domains/identity', NULL);
VALUES (N'identity', N'http://ed-fi.org/ods/identity/claims/services/identity', NULL);
END

IF NOT EXISTS (SELECT 1 FROM [dbo].[ResourceClaims] WHERE [ClaimName] = 'http://ed-fi.org/ods/identity/claims/domains/educationStandards')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ begin
VALUES ('assessmentMetadata', 'http://ed-fi.org/ods/identity/claims/domains/assessmentMetadata', null);
END IF;

IF NOT EXISTS(SELECT 1 FROM dbo.ResourceClaims WHERE ClaimName ='http://ed-fi.org/ods/identity/claims/domains/identity') THEN
IF NOT EXISTS(SELECT 1 FROM dbo.ResourceClaims WHERE ClaimName ='http://ed-fi.org/ods/identity/claims/services/identity') THEN
insert into dbo.ResourceClaims (ResourceName, ClaimName, ParentResourceClaimId)
values ('identity', 'http://ed-fi.org/ods/identity/claims/domains/identity', null);
values ('identity', 'http://ed-fi.org/ods/identity/claims/services/identity', null);
END IF;

IF NOT EXISTS(SELECT 1 FROM dbo.ResourceClaims WHERE ClaimName ='http://ed-fi.org/ods/identity/claims/domains/educationStandards') THEN
Expand Down

0 comments on commit ca72865

Please sign in to comment.