1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-06 05:28:15 -05:00

Requested updates

This commit is contained in:
Matt Portune 2020-06-24 12:24:36 -04:00
parent 09df3f64d3
commit 05891f2122
5 changed files with 15 additions and 13 deletions

View File

@ -5,9 +5,12 @@ BEGIN
SET NOCOUNT ON
SELECT TOP 1
*
SSO.*,
O.[Identifier]
FROM
[dbo].[SsoConfigView]
[dbo].[SsoConfigView] SSO
INNER JOIN
[dbo].[Organization] O ON O.[Id] = SSO.[OrganizationId]
WHERE
[Identifier] = @Identifier
O.[Identifier] = @Identifier
END

View File

@ -44,5 +44,7 @@ CREATE NONCLUSTERED INDEX [IX_Organization_Enabled]
INCLUDE ([UseTotp]);
GO
CREATE NONCLUSTERED INDEX [IX_Organization_Identifier]
CREATE UNIQUE NONCLUSTERED INDEX [IX_Organization_Identifier]
ON [dbo].[Organization]([Identifier] ASC)
WHERE [Identifier] IS NOT NULL;

View File

@ -1,8 +1,6 @@
CREATE VIEW [dbo].[SsoConfigView]
AS
SELECT
SSO.*
*
FROM
[dbo].[SsoConfig] SSO
INNER JOIN
[dbo].[Organization] O ON O.[Identifier] = SSO.[Identifier]
[dbo].[SsoConfig]

View File

@ -12,7 +12,8 @@ IF NOT EXISTS (
AND object_id = OBJECT_ID('[dbo].[Organization]')
)
BEGIN
CREATE NONCLUSTERED INDEX [IX_Organization_Identifier]
CREATE UNIQUE NONCLUSTERED INDEX [IX_Organization_Identifier]
ON [dbo].[Organization]([Identifier] ASC)
WHERE [Identifier] IS NOT NULL;
END
GO

View File

@ -23,11 +23,9 @@ GO
CREATE VIEW [dbo].[SsoConfigView]
AS
SELECT
SSO.*
*
FROM
[dbo].[SsoConfig] SSO
INNER JOIN
[dbo].[Organization] O ON O.[Identifier] = SSO.[Identifier]
[dbo].[SsoConfig]
IF OBJECT_ID('[dbo].[SsoConfig_ReadByIdentifier]') IS NOT NULL
BEGIN