51 lines
2.0 KiB
C#
51 lines
2.0 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|