Files
WCS/Cowain.TestProject/Migrations/20260126052919_pallet_water_value.cs

88 lines
3.0 KiB
C#
Raw Permalink Normal View History

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Cowain.TestProject.Migrations
{
/// <inheritdoc />
public partial class pallet_water_value : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "WaterValue",
table: "pallet_info_history",
type: "longtext",
nullable: true,
oldClrType: typeof(double),
oldType: "double")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<string>(
name: "WaterValue",
table: "pallet_info",
type: "longtext",
nullable: true,
oldClrType: typeof(double),
oldType: "double")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.UpdateData(
table: "user",
keyColumn: "Id",
keyValue: 1,
column: "CreateTime",
value: new DateTime(2026, 1, 26, 13, 29, 18, 736, DateTimeKind.Local).AddTicks(5446));
migrationBuilder.UpdateData(
table: "user_role",
keyColumn: "Id",
keyValue: 1,
column: "CreateTime",
value: new DateTime(2026, 1, 26, 13, 29, 18, 741, DateTimeKind.Local).AddTicks(3327));
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<double>(
name: "WaterValue",
table: "pallet_info_history",
type: "double",
nullable: false,
defaultValue: 0.0,
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true)
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<double>(
name: "WaterValue",
table: "pallet_info",
type: "double",
nullable: false,
defaultValue: 0.0,
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true)
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.UpdateData(
table: "user",
keyColumn: "Id",
keyValue: 1,
column: "CreateTime",
value: new DateTime(2026, 1, 26, 13, 27, 8, 455, DateTimeKind.Local).AddTicks(9319));
migrationBuilder.UpdateData(
table: "user_role",
keyColumn: "Id",
keyValue: 1,
column: "CreateTime",
value: new DateTime(2026, 1, 26, 13, 27, 8, 461, DateTimeKind.Local).AddTicks(1704));
}
}
}