mirror of
https://github.com/techgarage-ir/MTWireGuard.git
synced 2025-08-29 22:29:24 +02:00
49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace MTWireGuard.Migrations
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class Initialize : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Users",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|||
|
.Annotation("Sqlite:Autoincrement", true),
|
|||
|
Name = table.Column<string>(type: "TEXT", nullable: false),
|
|||
|
PrivateKey = table.Column<string>(type: "TEXT", nullable: false),
|
|||
|
PublicKey = table.Column<string>(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);
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Users");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|