重建迁移
This commit is contained in:
parent
3fdbe2bbcf
commit
a5910354f2
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||||||
namespace JiShe.IoT.Migrations
|
namespace JiShe.IoT.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(IoTDbContext))]
|
[DbContext(typeof(IoTDbContext))]
|
||||||
[Migration("20250708065507_InitialCreate")]
|
[Migration("20250714034934_InitialCreate")]
|
||||||
partial class InitialCreate
|
partial class InitialCreate
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@ -315,6 +315,9 @@ namespace JiShe.IoT.Migrations
|
|||||||
.HasColumnType("varchar(50)")
|
.HasColumnType("varchar(50)")
|
||||||
.HasComment("集中器在物联网平台中的设备ID");
|
.HasComment("集中器在物联网平台中的设备ID");
|
||||||
|
|
||||||
|
b.Property<string>("IoTPlatformProductId")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
b.Property<bool>("IsDeleted")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("tinyint(1)")
|
.HasColumnType("tinyint(1)")
|
||||||
@ -413,7 +416,10 @@ namespace JiShe.IoT.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("FocusAddress");
|
b.HasIndex("CreationTime");
|
||||||
|
|
||||||
|
b.HasIndex(new[] { "Id", "FocusAddress", "ProjectID", "FocusId", "CreationTime" }, "IX_ServiceProFocusInfo_IsNotUniqueKey")
|
||||||
|
.IsDescending();
|
||||||
|
|
||||||
b.ToTable("ServiceProFocusInfo", (string)null);
|
b.ToTable("ServiceProFocusInfo", (string)null);
|
||||||
});
|
});
|
||||||
@ -499,6 +505,12 @@ namespace JiShe.IoT.Migrations
|
|||||||
.HasColumnName("ExtraProperties")
|
.HasColumnName("ExtraProperties")
|
||||||
.HasComment("扩展属性,用于存储自定义字段,JSON格式");
|
.HasComment("扩展属性,用于存储自定义字段,JSON格式");
|
||||||
|
|
||||||
|
b.Property<string>("FocusAddress")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(20)
|
||||||
|
.HasColumnType("varchar(20)")
|
||||||
|
.HasComment("集中器地址");
|
||||||
|
|
||||||
b.Property<int>("FocusId")
|
b.Property<int>("FocusId")
|
||||||
.HasColumnType("int")
|
.HasColumnType("int")
|
||||||
.HasComment("集中器ID");
|
.HasComment("集中器ID");
|
||||||
@ -637,9 +649,14 @@ namespace JiShe.IoT.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CreationTime");
|
||||||
|
|
||||||
|
b.HasIndex("FocusAddress");
|
||||||
|
|
||||||
b.HasIndex("MeterAddress");
|
b.HasIndex("MeterAddress");
|
||||||
|
|
||||||
b.HasIndex("MeterId");
|
b.HasIndex(new[] { "Id", "MeterAddress", "FocusAddress", "ProjectID", "FocusId", "CreationTime" }, "IX_ServiceProMeterInfo_IsNotUniqueKey")
|
||||||
|
.IsDescending();
|
||||||
|
|
||||||
b.ToTable("ServiceProMeterInfo", (string)null);
|
b.ToTable("ServiceProMeterInfo", (string)null);
|
||||||
});
|
});
|
||||||
@ -778,6 +778,8 @@ namespace JiShe.IoT.Migrations
|
|||||||
IoTPlatform = table.Column<int>(type: "int", nullable: false, comment: "物联网平台类型,默认没有指定"),
|
IoTPlatform = table.Column<int>(type: "int", nullable: false, comment: "物联网平台类型,默认没有指定"),
|
||||||
PlatformPassword = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物联网平台设备密码")
|
PlatformPassword = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物联网平台设备密码")
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
IoTPlatformProductId = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
@ -859,6 +861,8 @@ namespace JiShe.IoT.Migrations
|
|||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
MeterAddress = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "表计地址")
|
MeterAddress = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "表计地址")
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
FocusAddress = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "集中器地址")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
MeterType = table.Column<int>(type: "int", nullable: false, comment: "表计类型"),
|
MeterType = table.Column<int>(type: "int", nullable: false, comment: "表计类型"),
|
||||||
Protocol = table.Column<int>(type: "int", nullable: false, comment: "协议类型"),
|
Protocol = table.Column<int>(type: "int", nullable: false, comment: "协议类型"),
|
||||||
Baudrate = table.Column<int>(type: "int", nullable: false, comment: "波特率"),
|
Baudrate = table.Column<int>(type: "int", nullable: false, comment: "波特率"),
|
||||||
@ -1550,20 +1554,37 @@ namespace JiShe.IoT.Migrations
|
|||||||
column: "UserName");
|
column: "UserName");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_ServiceProFocusInfo_FocusAddress",
|
name: "IX_ServiceProFocusInfo_CreationTime",
|
||||||
table: "ServiceProFocusInfo",
|
table: "ServiceProFocusInfo",
|
||||||
|
column: "CreationTime");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProFocusInfo_IsNotUniqueKey",
|
||||||
|
table: "ServiceProFocusInfo",
|
||||||
|
columns: new[] { "Id", "FocusAddress", "ProjectID", "FocusId", "CreationTime" },
|
||||||
|
descending: new bool[0]);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProMeterInfo_CreationTime",
|
||||||
|
table: "ServiceProMeterInfo",
|
||||||
|
column: "CreationTime");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProMeterInfo_FocusAddress",
|
||||||
|
table: "ServiceProMeterInfo",
|
||||||
column: "FocusAddress");
|
column: "FocusAddress");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProMeterInfo_IsNotUniqueKey",
|
||||||
|
table: "ServiceProMeterInfo",
|
||||||
|
columns: new[] { "Id", "MeterAddress", "FocusAddress", "ProjectID", "FocusId", "CreationTime" },
|
||||||
|
descending: new bool[0]);
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_ServiceProMeterInfo_MeterAddress",
|
name: "IX_ServiceProMeterInfo_MeterAddress",
|
||||||
table: "ServiceProMeterInfo",
|
table: "ServiceProMeterInfo",
|
||||||
column: "MeterAddress");
|
column: "MeterAddress");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ServiceProMeterInfo_MeterId",
|
|
||||||
table: "ServiceProMeterInfo",
|
|
||||||
column: "MeterId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_ServiceProTextTemplates_Code",
|
name: "IX_ServiceProTextTemplates_Code",
|
||||||
table: "ServiceProTextTemplates",
|
table: "ServiceProTextTemplates",
|
||||||
@ -312,6 +312,9 @@ namespace JiShe.IoT.Migrations
|
|||||||
.HasColumnType("varchar(50)")
|
.HasColumnType("varchar(50)")
|
||||||
.HasComment("集中器在物联网平台中的设备ID");
|
.HasComment("集中器在物联网平台中的设备ID");
|
||||||
|
|
||||||
|
b.Property<string>("IoTPlatformProductId")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
b.Property<bool>("IsDeleted")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("tinyint(1)")
|
.HasColumnType("tinyint(1)")
|
||||||
@ -410,7 +413,10 @@ namespace JiShe.IoT.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("FocusAddress");
|
b.HasIndex("CreationTime");
|
||||||
|
|
||||||
|
b.HasIndex(new[] { "Id", "FocusAddress", "ProjectID", "FocusId", "CreationTime" }, "IX_ServiceProFocusInfo_IsNotUniqueKey")
|
||||||
|
.IsDescending();
|
||||||
|
|
||||||
b.ToTable("ServiceProFocusInfo", (string)null);
|
b.ToTable("ServiceProFocusInfo", (string)null);
|
||||||
});
|
});
|
||||||
@ -496,6 +502,12 @@ namespace JiShe.IoT.Migrations
|
|||||||
.HasColumnName("ExtraProperties")
|
.HasColumnName("ExtraProperties")
|
||||||
.HasComment("扩展属性,用于存储自定义字段,JSON格式");
|
.HasComment("扩展属性,用于存储自定义字段,JSON格式");
|
||||||
|
|
||||||
|
b.Property<string>("FocusAddress")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(20)
|
||||||
|
.HasColumnType("varchar(20)")
|
||||||
|
.HasComment("集中器地址");
|
||||||
|
|
||||||
b.Property<int>("FocusId")
|
b.Property<int>("FocusId")
|
||||||
.HasColumnType("int")
|
.HasColumnType("int")
|
||||||
.HasComment("集中器ID");
|
.HasComment("集中器ID");
|
||||||
@ -634,9 +646,14 @@ namespace JiShe.IoT.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CreationTime");
|
||||||
|
|
||||||
|
b.HasIndex("FocusAddress");
|
||||||
|
|
||||||
b.HasIndex("MeterAddress");
|
b.HasIndex("MeterAddress");
|
||||||
|
|
||||||
b.HasIndex("MeterId");
|
b.HasIndex(new[] { "Id", "MeterAddress", "FocusAddress", "ProjectID", "FocusId", "CreationTime" }, "IX_ServiceProMeterInfo_IsNotUniqueKey")
|
||||||
|
.IsDescending();
|
||||||
|
|
||||||
b.ToTable("ServiceProMeterInfo", (string)null);
|
b.ToTable("ServiceProMeterInfo", (string)null);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user