server/aspnetapp/Migrations/20220522070842_LogEntity.cs
(完整代码) 1KBusing System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace aspnetapp.Migrations
{
public partial class LogEntity : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "syslog",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
createdate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
log_content = table.Column<string>(type: "varchar(5000)", maxLength: 5000, nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
log_type = table.Column<int>(type: "int", nullable: false),
log_user = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
log_ip = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PK_syslog", x => x.id);
})
.Annotation("MySql:CharSet", "utf8")
.Annotation("Relational:Collation", "utf8_general_ci");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "syslog");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。