mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
69 lines
2.2 KiB
C#
69 lines
2.2 KiB
C#
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);
|
||
}
|
||
}
|
||
}
|