51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Marco.Pms.DataAccess.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Removed_Assignee_From_JobTicket_Table : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_JobTickets_Employees_AssigneeId",
|
|
table: "JobTickets");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_JobTickets_AssigneeId",
|
|
table: "JobTickets");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "AssigneeId",
|
|
table: "JobTickets");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "AssigneeId",
|
|
table: "JobTickets",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
collation: "ascii_general_ci");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTickets_AssigneeId",
|
|
table: "JobTickets",
|
|
column: "AssigneeId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_JobTickets_Employees_AssigneeId",
|
|
table: "JobTickets",
|
|
column: "AssigneeId",
|
|
principalTable: "Employees",
|
|
principalColumn: "Id");
|
|
}
|
|
}
|
|
}
|