Files
CartriX/CartriX.Api/Migrations/20260517161013_Init4.cs
T
2026-05-18 01:58:29 +09:00

69 lines
2.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CartriX.Api.Migrations
{
/// <inheritdoc />
public partial class Init4 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Printers_СonnetctionTypes_connetctionTypeid",
table: "Printers");
migrationBuilder.DropPrimaryKey(
name: "PK_СonnetctionTypes",
table: "СonnetctionTypes");
migrationBuilder.RenameTable(
name: "СonnetctionTypes",
newName: "ConnectionTypes");
migrationBuilder.AddPrimaryKey(
name: "PK_ConnectionTypes",
table: "ConnectionTypes",
column: "id");
migrationBuilder.AddForeignKey(
name: "FK_Printers_ConnectionTypes_connetctionTypeid",
table: "Printers",
column: "connetctionTypeid",
principalTable: "ConnectionTypes",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Printers_ConnectionTypes_connetctionTypeid",
table: "Printers");
migrationBuilder.DropPrimaryKey(
name: "PK_ConnectionTypes",
table: "ConnectionTypes");
migrationBuilder.RenameTable(
name: "ConnectionTypes",
newName: "СonnetctionTypes");
migrationBuilder.AddPrimaryKey(
name: "PK_СonnetctionTypes",
table: "СonnetctionTypes",
column: "id");
migrationBuilder.AddForeignKey(
name: "FK_Printers_СonnetctionTypes_connetctionTypeid",
table: "Printers",
column: "connetctionTypeid",
principalTable: "СonnetctionTypes",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
}
}
}