143 lines
5.5 KiB
C#
143 lines
5.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BMA.EHR.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class updatetablePlacementAppointmentaddemployee : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "OrgEmployeeId",
|
|
table: "PlacementAppointments",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
collation: "ascii_general_ci");
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "PositionEmployeeLineId",
|
|
table: "PlacementAppointments",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
collation: "ascii_general_ci");
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "PositionEmployeePositionId",
|
|
table: "PlacementAppointments",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
collation: "ascii_general_ci");
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "PositionEmployeeStatusId",
|
|
table: "PlacementAppointments",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
collation: "ascii_general_ci");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_PlacementAppointments_OrgEmployeeId",
|
|
table: "PlacementAppointments",
|
|
column: "OrgEmployeeId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_PlacementAppointments_PositionEmployeeLineId",
|
|
table: "PlacementAppointments",
|
|
column: "PositionEmployeeLineId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_PlacementAppointments_PositionEmployeePositionId",
|
|
table: "PlacementAppointments",
|
|
column: "PositionEmployeePositionId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_PlacementAppointments_PositionEmployeeStatusId",
|
|
table: "PlacementAppointments",
|
|
column: "PositionEmployeeStatusId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_PlacementAppointments_OrganizationEmployees_OrgEmployeeId",
|
|
table: "PlacementAppointments",
|
|
column: "OrgEmployeeId",
|
|
principalTable: "OrganizationEmployees",
|
|
principalColumn: "Id");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_PlacementAppointments_PositionEmployeeLines_PositionEmployee~",
|
|
table: "PlacementAppointments",
|
|
column: "PositionEmployeeLineId",
|
|
principalTable: "PositionEmployeeLines",
|
|
principalColumn: "Id");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_PlacementAppointments_PositionEmployeePositions_PositionEmpl~",
|
|
table: "PlacementAppointments",
|
|
column: "PositionEmployeePositionId",
|
|
principalTable: "PositionEmployeePositions",
|
|
principalColumn: "Id");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_PlacementAppointments_PositionEmployeeStatuses_PositionEmplo~",
|
|
table: "PlacementAppointments",
|
|
column: "PositionEmployeeStatusId",
|
|
principalTable: "PositionEmployeeStatuses",
|
|
principalColumn: "Id");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_PlacementAppointments_OrganizationEmployees_OrgEmployeeId",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_PlacementAppointments_PositionEmployeeLines_PositionEmployee~",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_PlacementAppointments_PositionEmployeePositions_PositionEmpl~",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_PlacementAppointments_PositionEmployeeStatuses_PositionEmplo~",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_PlacementAppointments_OrgEmployeeId",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_PlacementAppointments_PositionEmployeeLineId",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_PlacementAppointments_PositionEmployeePositionId",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_PlacementAppointments_PositionEmployeeStatusId",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OrgEmployeeId",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PositionEmployeeLineId",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PositionEmployeePositionId",
|
|
table: "PlacementAppointments");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PositionEmployeeStatusId",
|
|
table: "PlacementAppointments");
|
|
}
|
|
}
|
|
}
|