mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
Turn on file scoped namespaces (#2225)
This commit is contained in:
@ -1,51 +1,50 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.MySqlMigrations.Migrations
|
||||
namespace Bit.MySqlMigrations.Migrations;
|
||||
|
||||
public partial class RemoveU2F : Migration
|
||||
{
|
||||
public partial class RemoveU2F : Migration
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "U2f");
|
||||
}
|
||||
migrationBuilder.DropTable(
|
||||
name: "U2f");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "U2f",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
AppId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Challenge = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
KeyHandle = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Version = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_U2f", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_U2f_User_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "User",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "U2f",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
AppId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Challenge = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
KeyHandle = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Version = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_U2f", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_U2f_User_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "User",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_U2f_UserId",
|
||||
table: "U2f",
|
||||
column: "UserId");
|
||||
}
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_U2f_UserId",
|
||||
table: "U2f",
|
||||
column: "UserId");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user