first commit -push

This commit is contained in:
dungtt
2025-10-15 15:15:53 +07:00
parent 674ae395be
commit a9577c5756
885 changed files with 74595 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RobotNet.RobotManager.Data.Migrations
{
/// <inheritdoc />
public partial class fixRobotDb : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Robots_RobotModels_MapId",
table: "Robots");
migrationBuilder.DropIndex(
name: "IX_Robots_MapId",
table: "Robots");
migrationBuilder.CreateIndex(
name: "IX_Robots_ModelId",
table: "Robots",
column: "ModelId");
migrationBuilder.AddForeignKey(
name: "FK_Robots_RobotModels_ModelId",
table: "Robots",
column: "ModelId",
principalTable: "RobotModels",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Robots_RobotModels_ModelId",
table: "Robots");
migrationBuilder.DropIndex(
name: "IX_Robots_ModelId",
table: "Robots");
migrationBuilder.CreateIndex(
name: "IX_Robots_MapId",
table: "Robots",
column: "MapId");
migrationBuilder.AddForeignKey(
name: "FK_Robots_RobotModels_MapId",
table: "Robots",
column: "MapId",
principalTable: "RobotModels",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}