RobotApp/RobotApp/Data/Migrations/20251029064620_InitConfigSafetyDb.cs
Đăng Nguyễn aa2146e383 update
2025-10-30 13:34:44 +07:00

46 lines
2.0 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RobotApp.Data.Migrations
{
/// <inheritdoc />
public partial class InitConfigSafetyDb : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "RobotSafetyConfig",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SafetySpeedVerySlow = table.Column<double>(type: "float", nullable: false),
SafetySpeedSlow = table.Column<double>(type: "float", nullable: false),
SafetySpeedNormal = table.Column<double>(type: "float", nullable: false),
SafetySpeedMedium = table.Column<double>(type: "float", nullable: false),
SafetySpeedOptimal = table.Column<double>(type: "float", nullable: false),
SafetySpeedFast = table.Column<double>(type: "float", nullable: false),
SafetySpeedVeryFast = table.Column<double>(type: "float", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
ConfigName = table.Column<string>(type: "nvarchar(64)", maxLength: 100, nullable: true),
Description = table.Column<string>(type: "ntext", maxLength: 500, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_RobotSafetyConfig", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RobotSafetyConfig");
}
}
}