Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ODS-6261] Added missing indexes to EdFi_Admin db (#642) #973

Merged
merged 2 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Pkg EdFi.Database.Admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
[int]$BuildIncrementer = "${{ env.BUILD_INCREMENTER }}"
[int]$newRevision = $BuildCounter + $BuildIncrementer
[string]$version = "${{env.INFORMATIONAL_VERSION}}"+ "." + $newRevision.ToString()
$packageOutput = "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/NugetPackages"
$packageOutput = "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/NugetPackages"
$AdminNuspecFilePath = "$env:GITHUB_WORKSPACE/NugetPackages/EdFi.Database.Admin.nuspec"
$AdminBACPACNuspecFilePath = "$env:GITHUB_WORKSPACE/NugetPackages/EdFi.Database.Admin.BACPAC.nuspec"
$AdminPostgreSQLNuspecFilePath = "$env:GITHUB_WORKSPACE/NugetPackages/EdFi.Database.Admin.PostgreSQL.nuspec"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.

-- Index [AK_ApiClients] --
BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'dbo.ApiClients') AND name = N'AK_ApiClients')
CREATE UNIQUE INDEX AK_ApiClients ON dbo.ApiClients ([Key])
GO
COMMIT

-- Index [IX_VendorNamespacePrefixes_VendorId] --
BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'dbo.VendorNamespacePrefixes') AND name = N'IX_VendorNamespacePrefixes_VendorId')
CREATE INDEX IX_VendorNamespacePrefixes_VendorId ON dbo.VendorNamespacePrefixes (Vendor_VendorId) INCLUDE (NamespacePrefix)
GO
COMMIT

-- Index [IX_ApiClientOwnershipTokens_ApiClientId] --
BEGIN TRANSACTION
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'dbo.ApiClientOwnershipTokens') AND name = N'IX_ApiClientOwnershipTokens_ApiClientId')
CREATE INDEX IX_ApiClientOwnershipTokens_ApiClientId ON dbo.ApiClientOwnershipTokens (ApiClient_ApiClientId) INCLUDE (OwnershipToken_OwnershipTokenId)
GO
COMMIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.

-- Index AK_ApiClients --
CREATE UNIQUE INDEX IF NOT EXISTS AK_ApiClients ON dbo.ApiClients
(
ApiClientId
);

-- Index IX_VendorNamespacePrefixes_VendorId --
CREATE INDEX IF NOT EXISTS IX_VendorNamespacePrefixes_VendorId ON dbo.VendorNamespacePrefixes
(
Vendor_VendorId
) INCLUDE (NamespacePrefix);

-- Index IX_ApiClientOwnershipTokens_ApiClientId --
CREATE INDEX IF NOT EXISTS IX_ApiClientOwnershipTokens_ApiClientId ON dbo.ApiClientOwnershipTokens
(
ApiClient_ApiClientId
) INCLUDE (OwnershipToken_OwnershipTokenId);
Loading