123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace MTWorkHR.Infrastructure.Migrations
- {
- /// <inheritdoc />
- public partial class altrContracyAttachs : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_ContractTaskAttachment_AttachmentTypes_AttachmentTypeId",
- table: "ContractTaskAttachment");
- migrationBuilder.DropForeignKey(
- name: "FK_ProjectStageAttachment_AttachmentTypes_AttachmentTypeId",
- table: "ProjectStageAttachment");
- migrationBuilder.DropIndex(
- name: "IX_ProjectStageAttachment_AttachmentTypeId",
- table: "ProjectStageAttachment");
- migrationBuilder.DropIndex(
- name: "IX_ContractTaskAttachment_AttachmentTypeId",
- table: "ContractTaskAttachment");
- migrationBuilder.DropColumn(
- name: "Content",
- table: "ProjectStageAttachment");
- migrationBuilder.DropColumn(
- name: "Content",
- table: "ContractTaskAttachment");
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn<byte[]>(
- name: "Content",
- table: "ProjectStageAttachment",
- type: "varbinary(max)",
- nullable: false,
- defaultValue: new byte[0]);
- migrationBuilder.AddColumn<byte[]>(
- name: "Content",
- table: "ContractTaskAttachment",
- type: "varbinary(max)",
- nullable: false,
- defaultValue: new byte[0]);
- migrationBuilder.CreateIndex(
- name: "IX_ProjectStageAttachment_AttachmentTypeId",
- table: "ProjectStageAttachment",
- column: "AttachmentTypeId");
- migrationBuilder.CreateIndex(
- name: "IX_ContractTaskAttachment_AttachmentTypeId",
- table: "ContractTaskAttachment",
- column: "AttachmentTypeId");
- migrationBuilder.AddForeignKey(
- name: "FK_ContractTaskAttachment_AttachmentTypes_AttachmentTypeId",
- table: "ContractTaskAttachment",
- column: "AttachmentTypeId",
- principalTable: "AttachmentTypes",
- principalColumn: "Id");
- migrationBuilder.AddForeignKey(
- name: "FK_ProjectStageAttachment_AttachmentTypes_AttachmentTypeId",
- table: "ProjectStageAttachment",
- column: "AttachmentTypeId",
- principalTable: "AttachmentTypes",
- principalColumn: "Id");
- }
- }
- }
|