Skip to content

Commit

Permalink
Run dotnet format
Browse files Browse the repository at this point in the history
  • Loading branch information
amorask-bitwarden committed Nov 26, 2024
1 parent 9b61d49 commit ef91f81
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 146 deletions.
3 changes: 2 additions & 1 deletion src/Api/Billing/Controllers/OrganizationsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ private async Task SaveOrganizationInstallationAsync(Guid organizationId, Guid i
{
await organizationInstallationRepository.CreateAsync(new OrganizationInstallation
{
OrganizationId = organizationId, InstallationId = installationId
OrganizationId = organizationId,
InstallationId = installationId
});
}

Check warning on line 387 in src/Api/Billing/Controllers/OrganizationsController.cs

View check run for this annotation

Codecov / codecov/patch

src/Api/Billing/Controllers/OrganizationsController.cs#L381-L387

Added lines #L381 - L387 were not covered by tests
else if (organizationInstallation.OrganizationId == organizationId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,60 +1,58 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Bit.MySqlMigrations.Migrations
namespace Bit.MySqlMigrations.Migrations;

/// <inheritdoc />
public partial class AddTable_OrganizationInstallation : Migration
{
/// <inheritdoc />
public partial class AddTable_OrganizationInstallation : Migration
protected override void Up(MigrationBuilder migrationBuilder)
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "OrganizationInstallation",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
OrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
InstallationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
CreationDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
RevisionDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationInstallation", x => x.Id);
table.ForeignKey(
name: "FK_OrganizationInstallation_Installation_InstallationId",
column: x => x.InstallationId,
principalTable: "Installation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_OrganizationInstallation_Organization_OrganizationId",
column: x => x.OrganizationId,
principalTable: "Organization",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationInstallation",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
OrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
InstallationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
CreationDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
RevisionDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationInstallation", x => x.Id);
table.ForeignKey(
name: "FK_OrganizationInstallation_Installation_InstallationId",
column: x => x.InstallationId,
principalTable: "Installation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_OrganizationInstallation_Organization_OrganizationId",
column: x => x.OrganizationId,
principalTable: "Organization",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");

migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_InstallationId",
table: "OrganizationInstallation",
column: "InstallationId");
migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_InstallationId",
table: "OrganizationInstallation",
column: "InstallationId");

migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_OrganizationId",
table: "OrganizationInstallation",
column: "OrganizationId");
}
migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_OrganizationId",
table: "OrganizationInstallation",
column: "OrganizationId");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "OrganizationInstallation");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "OrganizationInstallation");
}
}
Original file line number Diff line number Diff line change
@@ -1,59 +1,57 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Bit.PostgresMigrations.Migrations
namespace Bit.PostgresMigrations.Migrations;

/// <inheritdoc />
public partial class AddTable_OrganizationInstallation : Migration
{
/// <inheritdoc />
public partial class AddTable_OrganizationInstallation : Migration
protected override void Up(MigrationBuilder migrationBuilder)
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "OrganizationInstallation",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
OrganizationId = table.Column<Guid>(type: "uuid", nullable: false),
InstallationId = table.Column<Guid>(type: "uuid", nullable: false),
CreationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
RevisionDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationInstallation", x => x.Id);
table.ForeignKey(
name: "FK_OrganizationInstallation_Installation_InstallationId",
column: x => x.InstallationId,
principalTable: "Installation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_OrganizationInstallation_Organization_OrganizationId",
column: x => x.OrganizationId,
principalTable: "Organization",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "OrganizationInstallation",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
OrganizationId = table.Column<Guid>(type: "uuid", nullable: false),
InstallationId = table.Column<Guid>(type: "uuid", nullable: false),
CreationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
RevisionDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationInstallation", x => x.Id);
table.ForeignKey(
name: "FK_OrganizationInstallation_Installation_InstallationId",
column: x => x.InstallationId,
principalTable: "Installation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_OrganizationInstallation_Organization_OrganizationId",
column: x => x.OrganizationId,
principalTable: "Organization",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});

migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_InstallationId",
table: "OrganizationInstallation",
column: "InstallationId");
migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_InstallationId",
table: "OrganizationInstallation",
column: "InstallationId");

migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_OrganizationId",
table: "OrganizationInstallation",
column: "OrganizationId");
}
migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_OrganizationId",
table: "OrganizationInstallation",
column: "OrganizationId");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "OrganizationInstallation");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "OrganizationInstallation");
}
}
Original file line number Diff line number Diff line change
@@ -1,59 +1,57 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Bit.SqliteMigrations.Migrations
namespace Bit.SqliteMigrations.Migrations;

/// <inheritdoc />
public partial class AddTable_OrganizationInstallation : Migration
{
/// <inheritdoc />
public partial class AddTable_OrganizationInstallation : Migration
protected override void Up(MigrationBuilder migrationBuilder)
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "OrganizationInstallation",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
OrganizationId = table.Column<Guid>(type: "TEXT", nullable: false),
InstallationId = table.Column<Guid>(type: "TEXT", nullable: false),
CreationDate = table.Column<DateTime>(type: "TEXT", nullable: false),
RevisionDate = table.Column<DateTime>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationInstallation", x => x.Id);
table.ForeignKey(
name: "FK_OrganizationInstallation_Installation_InstallationId",
column: x => x.InstallationId,
principalTable: "Installation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_OrganizationInstallation_Organization_OrganizationId",
column: x => x.OrganizationId,
principalTable: "Organization",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "OrganizationInstallation",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
OrganizationId = table.Column<Guid>(type: "TEXT", nullable: false),
InstallationId = table.Column<Guid>(type: "TEXT", nullable: false),
CreationDate = table.Column<DateTime>(type: "TEXT", nullable: false),
RevisionDate = table.Column<DateTime>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationInstallation", x => x.Id);
table.ForeignKey(
name: "FK_OrganizationInstallation_Installation_InstallationId",
column: x => x.InstallationId,
principalTable: "Installation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_OrganizationInstallation_Organization_OrganizationId",
column: x => x.OrganizationId,
principalTable: "Organization",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});

migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_InstallationId",
table: "OrganizationInstallation",
column: "InstallationId");
migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_InstallationId",
table: "OrganizationInstallation",
column: "InstallationId");

migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_OrganizationId",
table: "OrganizationInstallation",
column: "OrganizationId");
}
migrationBuilder.CreateIndex(
name: "IX_OrganizationInstallation_OrganizationId",
table: "OrganizationInstallation",
column: "OrganizationId");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "OrganizationInstallation");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "OrganizationInstallation");
}
}

0 comments on commit ef91f81

Please sign in to comment.