首次提交:本地项目同步到Gitea
This commit is contained in:
133
Cowain.TestProject/Migrations/20260127070650_baking_mode_edit.cs
Normal file
133
Cowain.TestProject/Migrations/20260127070650_baking_mode_edit.cs
Normal file
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Cowain.TestProject.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class baking_mode_edit : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "WaterValue",
|
||||
table: "pallet_info_history",
|
||||
type: "varchar(200)",
|
||||
maxLength: 200,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "WaterValue",
|
||||
table: "battery_info",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Status",
|
||||
table: "battery_info",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Col",
|
||||
table: "battery_info",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Row",
|
||||
table: "battery_info",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "user",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1,
|
||||
column: "CreateTime",
|
||||
value: new DateTime(2026, 1, 27, 15, 6, 49, 534, DateTimeKind.Local).AddTicks(5788));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "user_role",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1,
|
||||
column: "CreateTime",
|
||||
value: new DateTime(2026, 1, 27, 15, 6, 49, 543, DateTimeKind.Local).AddTicks(1528));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Col",
|
||||
table: "battery_info");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Row",
|
||||
table: "battery_info");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "WaterValue",
|
||||
table: "pallet_info_history",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(200)",
|
||||
oldMaxLength: 200,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "WaterValue",
|
||||
table: "battery_info",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Status",
|
||||
table: "battery_info",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 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, 20, 49, 28, 660, DateTimeKind.Local).AddTicks(505));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "user_role",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1,
|
||||
column: "CreateTime",
|
||||
value: new DateTime(2026, 1, 26, 20, 49, 28, 665, DateTimeKind.Local).AddTicks(3692));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user