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 Init5 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Printers_PrintTypes_printTypeid",
|
|
table: "Printers");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "printTypeid",
|
|
table: "Printers",
|
|
newName: "printTypeId");
|
|
|
|
migrationBuilder.RenameIndex(
|
|
name: "IX_Printers_printTypeid",
|
|
table: "Printers",
|
|
newName: "IX_Printers_printTypeId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Printers_PrintTypes_printTypeId",
|
|
table: "Printers",
|
|
column: "printTypeId",
|
|
principalTable: "PrintTypes",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Printers_PrintTypes_printTypeId",
|
|
table: "Printers");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "printTypeId",
|
|
table: "Printers",
|
|
newName: "printTypeid");
|
|
|
|
migrationBuilder.RenameIndex(
|
|
name: "IX_Printers_printTypeId",
|
|
table: "Printers",
|
|
newName: "IX_Printers_printTypeid");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Printers_PrintTypes_printTypeid",
|
|
table: "Printers",
|
|
column: "printTypeid",
|
|
principalTable: "PrintTypes",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
}
|
|
}
|