68 lines
2.7 KiB
C#
68 lines
2.7 KiB
C#
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|
|||
|
|
#nullable disable
|
|||
|
|
|
|||
|
|
namespace JiShe.IoT.Migrations
|
|||
|
|
{
|
|||
|
|
/// <inheritdoc />
|
|||
|
|
public partial class udpate202512191347 : Migration
|
|||
|
|
{
|
|||
|
|
/// <inheritdoc />
|
|||
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.AddColumn<string>(
|
|||
|
|
name: "IoTPlatformRawFieldDataType",
|
|||
|
|
table: "ServiceProIoTPlatformThingModelInfo",
|
|||
|
|
type: "varchar(64)",
|
|||
|
|
maxLength: 64,
|
|||
|
|
nullable: true,
|
|||
|
|
comment: "物联网平台中对应的产品物模型属性或者事件数据类型")
|
|||
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
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");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <inheritdoc />
|
|||
|
|
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<string>(
|
|||
|
|
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");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|