JiShe.IOT.Admin/src/JiShe.IoT.EntityFrameworkCore/Migrations/20251217033440_update20251217.cs

51 lines
2.0 KiB
C#
Raw Normal View History

2025-12-17 15:51:11 +08:00
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JiShe.IoT.Migrations
{
/// <inheritdoc />
public partial class update20251217 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "IoTPlatformRawFieldExtension",
table: "ServiceProIoTPlatformThingModelInfo",
type: "text",
nullable: true,
comment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型",
oldClrType: typeof(string),
oldType: "text",
oldComment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "ServiceProIoTPlatformThingModelInfo",
keyColumn: "IoTPlatformRawFieldExtension",
keyValue: null,
column: "IoTPlatformRawFieldExtension",
value: "");
migrationBuilder.AlterColumn<string>(
name: "IoTPlatformRawFieldExtension",
table: "ServiceProIoTPlatformThingModelInfo",
type: "text",
nullable: false,
comment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true,
oldComment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}