mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
Слегка изменил сущности Добавил страницу в Web Сделал компонент с карточками для принетров
87 lines
2.7 KiB
C#
87 lines
2.7 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CartriX.Api.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Init2 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Printers_PrinterStatuses_PrinterStatusId",
|
|
table: "Printers");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "PrinterStatusId",
|
|
table: "Printers",
|
|
newName: "StatusId");
|
|
|
|
migrationBuilder.RenameIndex(
|
|
name: "IX_Printers_PrinterStatusId",
|
|
table: "Printers",
|
|
newName: "IX_Printers_StatusId");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "PicturePath",
|
|
table: "PrinterModels",
|
|
type: "TEXT",
|
|
nullable: true);
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "CausesFoReplace",
|
|
keyColumn: "Id",
|
|
keyValue: 3,
|
|
column: "Name",
|
|
value: "Бледнит");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Printers_PrinterStatuses_StatusId",
|
|
table: "Printers",
|
|
column: "StatusId",
|
|
principalTable: "PrinterStatuses",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Printers_PrinterStatuses_StatusId",
|
|
table: "Printers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PicturePath",
|
|
table: "PrinterModels");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "StatusId",
|
|
table: "Printers",
|
|
newName: "PrinterStatusId");
|
|
|
|
migrationBuilder.RenameIndex(
|
|
name: "IX_Printers_StatusId",
|
|
table: "Printers",
|
|
newName: "IX_Printers_PrinterStatusId");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "CausesFoReplace",
|
|
keyColumn: "Id",
|
|
keyValue: 3,
|
|
column: "Name",
|
|
value: "Бледнит>");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Printers_PrinterStatuses_PrinterStatusId",
|
|
table: "Printers",
|
|
column: "PrinterStatusId",
|
|
principalTable: "PrinterStatuses",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
}
|
|
}
|