mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
63 lines
2.0 KiB
C#
63 lines
2.0 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CartriX.Api.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Init6 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Printers_StatusPrinters_StautsId",
|
|
table: "Printers");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "StautsId",
|
|
table: "Printers",
|
|
newName: "StatusId");
|
|
|
|
migrationBuilder.RenameIndex(
|
|
name: "IX_Printers_StautsId",
|
|
table: "Printers",
|
|
newName: "IX_Printers_StatusId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Printers_StatusPrinters_StatusId",
|
|
table: "Printers",
|
|
column: "StatusId",
|
|
principalTable: "StatusPrinters",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Printers_StatusPrinters_StatusId",
|
|
table: "Printers");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "StatusId",
|
|
table: "Printers",
|
|
newName: "StautsId");
|
|
|
|
migrationBuilder.RenameIndex(
|
|
name: "IX_Printers_StatusId",
|
|
table: "Printers",
|
|
newName: "IX_Printers_StautsId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Printers_StatusPrinters_StautsId",
|
|
table: "Printers",
|
|
column: "StautsId",
|
|
principalTable: "StatusPrinters",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
}
|
|
}
|