mirror of
https://github.com/bitwarden/server
synced 2025-12-16 08:13:33 +00:00
PM-26966 added new metric columns to organization report table (#6486)
* PM-26966 added new metric columns to organization report table * PM-26966 fixing migration * PM-26966 fixing formatting issue. * PM-26966 updating unit tests * PM-26966 fixing SQL to read from view
This commit is contained in:
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");
|
||||
}
|
||||
}
|
||||
@@ -1014,6 +1014,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");
|
||||
|
||||
@@ -1024,9 +1030,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");
|
||||
|
||||
Reference in New Issue
Block a user