mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
Был сделан запрос POST для создание записи о принтере
This commit is contained in:
1 parent
7a0e7e0801
commit
02160f451f
43 files changed
+1044
-634
No files matched your search
@@ -0,0 +1,59 @@
|
||||
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_Locations_locationId",
|
||||
table: "Printers");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "locationId",
|
||||
table: "Printers",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Printers_Locations_locationId",
|
||||
table: "Printers",
|
||||
column: "locationId",
|
||||
principalTable: "Locations",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Printers_Locations_locationId",
|
||||
table: "Printers");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "locationId",
|
||||
table: "Printers",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Printers_Locations_locationId",
|
||||
table: "Printers",
|
||||
column: "locationId",
|
||||
principalTable: "Locations",
|
||||
principalColumn: "id");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user