mirror of
https://github.com/bitwarden/server
synced 2025-12-31 07:33:43 +00:00
Merge branch 'main' into SM-1571-DisableSMAdsForUsers
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
CREATE OR ALTER VIEW [dbo].[ProviderUserProviderOrganizationDetailsView]
|
||||
AS
|
||||
SELECT
|
||||
PU.[UserId],
|
||||
PO.[OrganizationId],
|
||||
O.[Name],
|
||||
O.[Enabled],
|
||||
O.[UsePolicies],
|
||||
O.[UseSso],
|
||||
O.[UseKeyConnector],
|
||||
O.[UseScim],
|
||||
O.[UseGroups],
|
||||
O.[UseDirectory],
|
||||
O.[UseEvents],
|
||||
O.[UseTotp],
|
||||
O.[Use2fa],
|
||||
O.[UseApi],
|
||||
O.[UseResetPassword],
|
||||
O.[UseSecretsManager],
|
||||
O.[UsePasswordManager],
|
||||
O.[SelfHost],
|
||||
O.[UsersGetPremium],
|
||||
O.[UseCustomPermissions],
|
||||
O.[Seats],
|
||||
O.[MaxCollections],
|
||||
O.[MaxStorageGb],
|
||||
O.[Identifier],
|
||||
PO.[Key],
|
||||
O.[PublicKey],
|
||||
O.[PrivateKey],
|
||||
PU.[Status],
|
||||
PU.[Type],
|
||||
PO.[ProviderId],
|
||||
PU.[Id] ProviderUserId,
|
||||
P.[Name] ProviderName,
|
||||
O.[PlanType],
|
||||
O.[LimitCollectionCreation],
|
||||
O.[LimitCollectionDeletion],
|
||||
O.[AllowAdminAccessToAllCollectionItems],
|
||||
O.[UseRiskInsights],
|
||||
O.[UseAdminSponsoredFamilies],
|
||||
P.[Type] ProviderType,
|
||||
O.[LimitItemDeletion],
|
||||
O.[UseOrganizationDomains],
|
||||
O.[UseAutomaticUserConfirmation],
|
||||
SS.[Enabled] SsoEnabled,
|
||||
SS.[Data] SsoConfig
|
||||
FROM
|
||||
[dbo].[ProviderUser] PU
|
||||
INNER JOIN
|
||||
[dbo].[ProviderOrganization] PO ON PO.[ProviderId] = PU.[ProviderId]
|
||||
INNER JOIN
|
||||
[dbo].[Organization] O ON O.[Id] = PO.[OrganizationId]
|
||||
INNER JOIN
|
||||
[dbo].[Provider] P ON P.[Id] = PU.[ProviderId]
|
||||
LEFT JOIN
|
||||
[dbo].[SsoConfig] SS ON SS.[OrganizationId] = O.[Id]
|
||||
GO
|
||||
|
||||
IF OBJECT_ID('[dbo].[ProviderUserProviderOrganizationDetails_ReadByUserIdStatus]') IS NOT NULL
|
||||
BEGIN
|
||||
EXECUTE sp_refreshsqlmodule N'[dbo].[ProviderUserProviderOrganizationDetails_ReadByUserIdStatus]';
|
||||
END
|
||||
GO
|
||||
@@ -0,0 +1,161 @@
|
||||
IF COL_LENGTH('dbo.OrganizationReport', 'ApplicationCount') IS NULL
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[OrganizationReport]
|
||||
ADD [ApplicationCount] INT NULL,
|
||||
[ApplicationAtRiskCount] INT NULL,
|
||||
[CriticalApplicationCount] INT NULL,
|
||||
[CriticalApplicationAtRiskCount] INT NULL,
|
||||
[MemberCount] INT NULL,
|
||||
[MemberAtRiskCount] INT NULL,
|
||||
[CriticalMemberCount] INT NULL,
|
||||
[CriticalMemberAtRiskCount] INT NULL,
|
||||
[PasswordCount] INT NULL,
|
||||
[PasswordAtRiskCount] INT NULL,
|
||||
[CriticalPasswordCount] INT NULL,
|
||||
[CriticalPasswordAtRiskCount] INT NULL
|
||||
END
|
||||
GO
|
||||
|
||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationReport_Create]
|
||||
@Id UNIQUEIDENTIFIER OUTPUT,
|
||||
@OrganizationId UNIQUEIDENTIFIER,
|
||||
@ReportData NVARCHAR(MAX),
|
||||
@CreationDate DATETIME2(7),
|
||||
@ContentEncryptionKey VARCHAR(MAX),
|
||||
@SummaryData NVARCHAR(MAX),
|
||||
@ApplicationData NVARCHAR(MAX),
|
||||
@RevisionDate DATETIME2(7),
|
||||
@ApplicationCount INT = NULL,
|
||||
@ApplicationAtRiskCount INT = NULL,
|
||||
@CriticalApplicationCount INT = NULL,
|
||||
@CriticalApplicationAtRiskCount INT = NULL,
|
||||
@MemberCount INT = NULL,
|
||||
@MemberAtRiskCount INT = NULL,
|
||||
@CriticalMemberCount INT = NULL,
|
||||
@CriticalMemberAtRiskCount INT = NULL,
|
||||
@PasswordCount INT = NULL,
|
||||
@PasswordAtRiskCount INT = NULL,
|
||||
@CriticalPasswordCount INT = NULL,
|
||||
@CriticalPasswordAtRiskCount INT = NULL
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
INSERT INTO [dbo].[OrganizationReport](
|
||||
[Id],
|
||||
[OrganizationId],
|
||||
[ReportData],
|
||||
[CreationDate],
|
||||
[ContentEncryptionKey],
|
||||
[SummaryData],
|
||||
[ApplicationData],
|
||||
[RevisionDate],
|
||||
[ApplicationCount],
|
||||
[ApplicationAtRiskCount],
|
||||
[CriticalApplicationCount],
|
||||
[CriticalApplicationAtRiskCount],
|
||||
[MemberCount],
|
||||
[MemberAtRiskCount],
|
||||
[CriticalMemberCount],
|
||||
[CriticalMemberAtRiskCount],
|
||||
[PasswordCount],
|
||||
[PasswordAtRiskCount],
|
||||
[CriticalPasswordCount],
|
||||
[CriticalPasswordAtRiskCount]
|
||||
)
|
||||
VALUES (
|
||||
@Id,
|
||||
@OrganizationId,
|
||||
@ReportData,
|
||||
@CreationDate,
|
||||
@ContentEncryptionKey,
|
||||
@SummaryData,
|
||||
@ApplicationData,
|
||||
@RevisionDate,
|
||||
@ApplicationCount,
|
||||
@ApplicationAtRiskCount,
|
||||
@CriticalApplicationCount,
|
||||
@CriticalApplicationAtRiskCount,
|
||||
@MemberCount,
|
||||
@MemberAtRiskCount,
|
||||
@CriticalMemberCount,
|
||||
@CriticalMemberAtRiskCount,
|
||||
@PasswordCount,
|
||||
@PasswordAtRiskCount,
|
||||
@CriticalPasswordCount,
|
||||
@CriticalPasswordAtRiskCount
|
||||
);
|
||||
END
|
||||
GO
|
||||
|
||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationReport_Update]
|
||||
@Id UNIQUEIDENTIFIER,
|
||||
@OrganizationId UNIQUEIDENTIFIER,
|
||||
@ReportData NVARCHAR(MAX),
|
||||
@CreationDate DATETIME2(7),
|
||||
@ContentEncryptionKey VARCHAR(MAX),
|
||||
@SummaryData NVARCHAR(MAX),
|
||||
@ApplicationData NVARCHAR(MAX),
|
||||
@RevisionDate DATETIME2(7),
|
||||
@ApplicationCount INT = NULL,
|
||||
@ApplicationAtRiskCount INT = NULL,
|
||||
@CriticalApplicationCount INT = NULL,
|
||||
@CriticalApplicationAtRiskCount INT = NULL,
|
||||
@MemberCount INT = NULL,
|
||||
@MemberAtRiskCount INT = NULL,
|
||||
@CriticalMemberCount INT = NULL,
|
||||
@CriticalMemberAtRiskCount INT = NULL,
|
||||
@PasswordCount INT = NULL,
|
||||
@PasswordAtRiskCount INT = NULL,
|
||||
@CriticalPasswordCount INT = NULL,
|
||||
@CriticalPasswordAtRiskCount INT = NULL
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
UPDATE [dbo].[OrganizationReport]
|
||||
SET
|
||||
[OrganizationId] = @OrganizationId,
|
||||
[ReportData] = @ReportData,
|
||||
[CreationDate] = @CreationDate,
|
||||
[ContentEncryptionKey] = @ContentEncryptionKey,
|
||||
[SummaryData] = @SummaryData,
|
||||
[ApplicationData] = @ApplicationData,
|
||||
[RevisionDate] = @RevisionDate,
|
||||
[ApplicationCount] = @ApplicationCount,
|
||||
[ApplicationAtRiskCount] = @ApplicationAtRiskCount,
|
||||
[CriticalApplicationCount] = @CriticalApplicationCount,
|
||||
[CriticalApplicationAtRiskCount] = @CriticalApplicationAtRiskCount,
|
||||
[MemberCount] = @MemberCount,
|
||||
[MemberAtRiskCount] = @MemberAtRiskCount,
|
||||
[CriticalMemberCount] = @CriticalMemberCount,
|
||||
[CriticalMemberAtRiskCount] = @CriticalMemberAtRiskCount,
|
||||
[PasswordCount] = @PasswordCount,
|
||||
[PasswordAtRiskCount] = @PasswordAtRiskCount,
|
||||
[CriticalPasswordCount] = @CriticalPasswordCount,
|
||||
[CriticalPasswordAtRiskCount] = @CriticalPasswordAtRiskCount
|
||||
WHERE [Id] = @Id;
|
||||
END;
|
||||
GO
|
||||
|
||||
CREATE OR ALTER VIEW [dbo].[OrganizationReportView]
|
||||
AS
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[OrganizationReport]
|
||||
GO
|
||||
|
||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationReport_GetLatestByOrganizationId]
|
||||
@OrganizationId UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT TOP 1
|
||||
*
|
||||
FROM [dbo].[OrganizationReportView]
|
||||
WHERE [OrganizationId] = @OrganizationId
|
||||
ORDER BY [RevisionDate] DESC
|
||||
END
|
||||
GO
|
||||
|
||||
3440
util/MySqlMigrations/Migrations/20251028135609_2025-10-28_00_AddOrganizationReportMetricColumns.Designer.cs
generated
Normal file
3440
util/MySqlMigrations/Migrations/20251028135609_2025-10-28_00_AddOrganizationReportMetricColumns.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,137 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.MySqlMigrations.Migrations;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class _20251028_00_AddOrganizationReportMetricColumns : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ApplicationAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ApplicationCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalApplicationAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalApplicationCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalMemberAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalMemberCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalPasswordAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalPasswordCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MemberAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MemberCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PasswordAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PasswordCount",
|
||||
table: "OrganizationReport",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ApplicationAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ApplicationCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalApplicationAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalApplicationCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalMemberAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalMemberCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalPasswordAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalPasswordCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MemberAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MemberCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PasswordAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PasswordCount",
|
||||
table: "OrganizationReport");
|
||||
}
|
||||
}
|
||||
@@ -1017,6 +1017,12 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<int?>("ApplicationAtRiskCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("ApplicationCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ApplicationData")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
@@ -1027,9 +1033,39 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int?>("CriticalApplicationAtRiskCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("CriticalApplicationCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("CriticalMemberAtRiskCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("CriticalMemberCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("CriticalPasswordAtRiskCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("CriticalPasswordCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("MemberAtRiskCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("MemberCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("OrganizationId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<int?>("PasswordAtRiskCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("PasswordCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReportData")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,137 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class _20251028_00_AddOrganizationReportMetricColumns : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ApplicationAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ApplicationCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalApplicationAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalApplicationCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalMemberAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalMemberCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalPasswordAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalPasswordCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MemberAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MemberCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PasswordAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PasswordCount",
|
||||
table: "OrganizationReport",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ApplicationAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ApplicationCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalApplicationAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalApplicationCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalMemberAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalMemberCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalPasswordAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalPasswordCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MemberAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MemberCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PasswordAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PasswordCount",
|
||||
table: "OrganizationReport");
|
||||
}
|
||||
}
|
||||
@@ -1022,6 +1022,12 @@ namespace Bit.PostgresMigrations.Migrations
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<int?>("ApplicationAtRiskCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("ApplicationCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ApplicationData")
|
||||
.HasColumnType("text");
|
||||
|
||||
@@ -1032,9 +1038,39 @@ namespace Bit.PostgresMigrations.Migrations
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int?>("CriticalApplicationAtRiskCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("CriticalApplicationCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("CriticalMemberAtRiskCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("CriticalMemberCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("CriticalPasswordAtRiskCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("CriticalPasswordCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("MemberAtRiskCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("MemberCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<Guid>("OrganizationId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<int?>("PasswordAtRiskCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PasswordCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ReportData")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
3429
util/SqliteMigrations/Migrations/20251028135617_2025-10-28_00_AddOrganizationReportMetricColumns.Designer.cs
generated
Normal file
3429
util/SqliteMigrations/Migrations/20251028135617_2025-10-28_00_AddOrganizationReportMetricColumns.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,137 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.SqliteMigrations.Migrations;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class _20251028_00_AddOrganizationReportMetricColumns : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ApplicationAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ApplicationCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalApplicationAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalApplicationCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalMemberAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalMemberCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalPasswordAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriticalPasswordCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MemberAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MemberCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PasswordAtRiskCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PasswordCount",
|
||||
table: "OrganizationReport",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ApplicationAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ApplicationCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalApplicationAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalApplicationCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalMemberAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalMemberCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalPasswordAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriticalPasswordCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MemberAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MemberCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PasswordAtRiskCount",
|
||||
table: "OrganizationReport");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PasswordCount",
|
||||
table: "OrganizationReport");
|
||||
}
|
||||
}
|
||||
@@ -1006,6 +1006,12 @@ namespace Bit.SqliteMigrations.Migrations
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("ApplicationAtRiskCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("ApplicationCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("ApplicationData")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
@@ -1016,9 +1022,39 @@ namespace Bit.SqliteMigrations.Migrations
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("CriticalApplicationAtRiskCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CriticalApplicationCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CriticalMemberAtRiskCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CriticalMemberCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CriticalPasswordAtRiskCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CriticalPasswordCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("MemberAtRiskCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("MemberCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<Guid>("OrganizationId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("PasswordAtRiskCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("PasswordCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("ReportData")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
Reference in New Issue
Block a user