mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-22 09:12:26 +00:00
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace ProjectLighthouse.Migrations
|
|
{
|
|
public partial class AddWebTokens : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "WebTokens",
|
|
columns: table => new
|
|
{
|
|
TokenId = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
UserId = table.Column<int>(type: "int", nullable: false),
|
|
UserToken = table.Column<string>(type: "longtext", nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_WebTokens", x => x.TokenId);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "WebTokens");
|
|
}
|
|
}
|
|
}
|