mirror of
https://github.com/bitwarden/server
synced 2025-12-15 15:53:59 +00:00
* 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
138 lines
4.0 KiB
C#
138 lines
4.0 KiB
C#
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");
|
|
}
|
|
}
|