mirror of
https://github.com/bitwarden/server.git
synced 2024-12-12 15:26:48 +01:00
44 lines
1.6 KiB
C#
44 lines
1.6 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace Bit.SqliteMigrations.Migrations;
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class PasswordHealthReportApplication : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "PasswordHealthReportApplication",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
|||
|
OrganizationId = table.Column<Guid>(type: "TEXT", nullable: true),
|
|||
|
Uri = table.Column<string>(type: "TEXT", nullable: true),
|
|||
|
CreationDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|||
|
RevisionDate = table.Column<DateTime>(type: "TEXT", nullable: false)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_PasswordHealthReportApplication", x => x.Id);
|
|||
|
table.ForeignKey(
|
|||
|
name: "FK_PasswordHealthReportApplication_Organization_OrganizationId",
|
|||
|
column: x => x.OrganizationId,
|
|||
|
principalTable: "Organization",
|
|||
|
principalColumn: "Id");
|
|||
|
});
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_PasswordHealthReportApplication_OrganizationId",
|
|||
|
table: "PasswordHealthReportApplication",
|
|||
|
column: "OrganizationId");
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(name: "PasswordHealthReportApplication");
|
|||
|
}
|
|||
|
}
|