using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace MTWorkHR.Infrastructure.Migrations { /// public partial class altrContracyAttachs : Migration { /// 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"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "Content", table: "ProjectStageAttachment", type: "varbinary(max)", nullable: false, defaultValue: new byte[0]); migrationBuilder.AddColumn( 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"); } } }