1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-07 02:52:50 -05:00

[EC-1014] Create Organization Status (Pending/Created) (#2610)

* [EC-427] Add columns 'Type' and 'BillingPhone' to Provider table

* [EC-427] Provider table Type and BillingPhone MySql migrations

* [EC-427] Provider table Type and BillingPhone Postgres migrations

* [EC-427] Add mysql migration script

* [EC-427] Add mysql migration script

* [EC-427] Updated Provider sql script to include default column value

* [EC-427] Removed default value from Provider.Type column

* [EC-427] Changed migration script to include a default value constraint instead of updating the null type

* [EC-427] Updated Sql project Provider table script

* [EC-427] Changed migration script to use 'Create OR Alter' for views and sprocs

* [EC-427] Added default values for 'BillingPhone' and 'Type' fields on sprocs [dbo].[Provider_Create] and [dbo].[Provider_Update]

* [EC-427] Adjusting metadata in migration script

* [EC-427] Updated Provider sprocs SQL script files

* [EC-427] Fixed migration script

* [EC-427] Added sqlite migration

* [EC-427] Add missing Provider_Update sproc default value

* [EC-427] Added missing GO action to migration script

* [EC-428] Redirect to Edit after creating Provider

* Revert "[EC-428] Redirect to Edit after creating Provider"

This reverts commit 6347bca1ed.

* [EC-1014] Create OrganizationStatusType and add Status column to Organizations table

* [EC-1014] Added EF migrations

* [EC-1014] dotnet format

* [EC-1014] Changed Organization.Status from SMALLINT to TINYINT

* [EC-1014] Set Organization.Status default value = 1

* [EC-1014] Setting Organization.Status default value as 1
This commit is contained in:
Rui Tomé
2023-02-01 10:45:40 +00:00
committed by GitHub
parent 6dfbd06e8f
commit 9e7741d58b
19 changed files with 6735 additions and 9 deletions

View File

@ -43,7 +43,8 @@
@UseKeyConnector BIT = 0,
@UseScim BIT = 0,
@UseCustomPermissions BIT = 0,
@UseSecretsManager BIT = 0
@UseSecretsManager BIT = 0,
@Status TINYINT = 0
AS
BEGIN
SET NOCOUNT ON
@ -94,7 +95,8 @@ BEGIN
[UseKeyConnector],
[UseScim],
[UseCustomPermissions],
[UseSecretsManager]
[UseSecretsManager],
[Status]
)
VALUES
(
@ -142,6 +144,7 @@ BEGIN
@UseKeyConnector,
@UseScim,
@UseCustomPermissions,
@UseSecretsManager
@UseSecretsManager,
@Status
)
END

View File

@ -43,7 +43,8 @@
@UseKeyConnector BIT = 0,
@UseScim BIT = 0,
@UseCustomPermissions BIT = 0,
@UseSecretsManager BIT = 0
@UseSecretsManager BIT = 0,
@Status TINYINT = 0
AS
BEGIN
SET NOCOUNT ON
@ -94,7 +95,8 @@ BEGIN
[UseKeyConnector] = @UseKeyConnector,
[UseScim] = @UseScim,
[UseCustomPermissions] = @UseCustomPermissions,
[UseSecretsManager] = @UseSecretsManager
[UseSecretsManager] = @UseSecretsManager,
[Status] = @Status
WHERE
[Id] = @Id
END

View File

@ -44,6 +44,7 @@
[UseScim] BIT NOT NULL CONSTRAINT [DF_Organization_UseScim] DEFAULT (0),
[UseCustomPermissions] BIT NOT NULL CONSTRAINT [DF_Organization_UseCustomPermissions] DEFAULT (0),
[UseSecretsManager] BIT NOT NULL CONSTRAINT [DF_Organization_UseSecretsManager] DEFAULT (0),
[Status] TINYINT NOT NULL CONSTRAINT [DF_Organization_Status] DEFAULT (1),
CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED ([Id] ASC)
);

View File

@ -11,7 +11,8 @@ SELECT
PO.[RevisionDate],
(SELECT COUNT(1) FROM [dbo].[OrganizationUser] OU WHERE OU.OrganizationId = PO.OrganizationId AND OU.Status = 2) UserCount,
O.[Seats],
O.[Plan]
O.[Plan],
O.[Status]
FROM
[dbo].[ProviderOrganization] PO
LEFT JOIN