using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JiShe.IoT.Migrations
{
///
public partial class udpate202512191347 : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "IoTPlatformRawFieldDataType",
table: "ServiceProIoTPlatformThingModelInfo",
type: "varchar(64)",
maxLength: 64,
nullable: true,
comment: "物联网平台中对应的产品物模型属性或者事件数据类型")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn(
name: "IoTPlatformRawFieldDataType",
table: "ServiceProDeviceThingModelPropertylInfo",
type: "varchar(20)",
maxLength: 20,
nullable: true,
comment: "物联网平台中对应的产品物模型属性或者事件数据类型",
oldClrType: typeof(string),
oldType: "varchar(20)",
oldMaxLength: 20,
oldComment: "物联网平台中对应的产品物模型属性或者事件数据类型")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IoTPlatformRawFieldDataType",
table: "ServiceProIoTPlatformThingModelInfo");
migrationBuilder.UpdateData(
table: "ServiceProDeviceThingModelPropertylInfo",
keyColumn: "IoTPlatformRawFieldDataType",
keyValue: null,
column: "IoTPlatformRawFieldDataType",
value: "");
migrationBuilder.AlterColumn(
name: "IoTPlatformRawFieldDataType",
table: "ServiceProDeviceThingModelPropertylInfo",
type: "varchar(20)",
maxLength: 20,
nullable: false,
comment: "物联网平台中对应的产品物模型属性或者事件数据类型",
oldClrType: typeof(string),
oldType: "varchar(20)",
oldMaxLength: 20,
oldNullable: true,
oldComment: "物联网平台中对应的产品物模型属性或者事件数据类型")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}