using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MTWireGuard.Application.Migrations
{
///
public partial class Initialize : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Name = table.Column(type: "TEXT", nullable: false),
PrivateKey = table.Column(type: "TEXT", nullable: false),
PublicKey = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_Users_PrivateKey",
table: "Users",
column: "PrivateKey",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Users_PublicKey",
table: "Users",
column: "PublicKey",
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Users");
}
}
}