12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace MTWorkHR.Infrastructure.Migrations
- {
- /// <inheritdoc />
- public partial class altrTaskHistory2 : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_UserTaskHistories_UserTasks_UserTaskId",
- table: "UserTaskHistories");
- migrationBuilder.DropIndex(
- name: "IX_UserTaskHistories_UserTaskId",
- table: "UserTaskHistories");
- migrationBuilder.DropColumn(
- name: "UserTaskId",
- table: "UserTaskHistories");
- migrationBuilder.CreateIndex(
- name: "IX_UserTaskHistories_TaskId",
- table: "UserTaskHistories",
- column: "TaskId");
- migrationBuilder.AddForeignKey(
- name: "FK_UserTaskHistories_UserTasks_TaskId",
- table: "UserTaskHistories",
- column: "TaskId",
- principalTable: "UserTasks",
- principalColumn: "Id",
- onDelete: ReferentialAction.NoAction);
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_UserTaskHistories_UserTasks_TaskId",
- table: "UserTaskHistories");
- migrationBuilder.DropIndex(
- name: "IX_UserTaskHistories_TaskId",
- table: "UserTaskHistories");
- migrationBuilder.AddColumn<long>(
- name: "UserTaskId",
- table: "UserTaskHistories",
- type: "bigint",
- nullable: true);
- migrationBuilder.CreateIndex(
- name: "IX_UserTaskHistories_UserTaskId",
- table: "UserTaskHistories",
- column: "UserTaskId");
- migrationBuilder.AddForeignKey(
- name: "FK_UserTaskHistories_UserTasks_UserTaskId",
- table: "UserTaskHistories",
- column: "UserTaskId",
- principalTable: "UserTasks",
- principalColumn: "Id");
- }
- }
- }
|